Code Monkey home page Code Monkey logo

perl6-msgpack's Introduction

MsgPack

Build Status Build status

Perl 6 Interface to libmsgpack

Example

use v6;
use MsgPack;

my $data     = [1, True, "Example", { "that" => "rocks" }];
my $packed   = MsgPack::pack($data);
my $unpacked = MsgPack::unpack($packed);

say "data     : " ~ $data.perl;
say "packed   : " ~ $packed.perl;
say "unpacked : " ~ $unpacked.perl;

For more examples, please see the examples folder.

Installation

  • Please follow the section below to install libmsgpack on your system.

  • Install it using zef (a module management tool bundled with Rakudo Star):

$ zef install MsgPack

Dependencies

Please follow the instructions below based on your platform:

Linux (Debian)

  • To install msgpack development headers / libraries, please run:
$ sudo apt-get install libmsgpack-dev

macOS

  • To install msgpack development headers / libraries, please run:
$ brew update
$ brew install msgpack

Windows

Not supported at the moment but planned as a pre-built DLL in the near future.

TODO support windows with a pre-built DLL

Testing

  • To run tests:
$ prove -ve "perl6 -Ilib"
  • To run all tests including author tests (Please make sure Test::Meta is installed):
$ zef install Test::META
$ AUTHOR_TESTING=1 prove -e "perl6 -Ilib"

See Also

  • Data::MessagePack

    Most of the excellent tests here are based of the work of Pierre Vigier. Thanks for creating an excellent pure Perl 6 reference implementation.

Author

Ahmad M. Zawawi, azawawi on #perl6

License

MIT License

perl6-msgpack's People

Contributors

altai-man avatar azawawi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

perl6-msgpack's Issues

The module is broken on latest stable release

➜  ~ zef install MsgPack
===> Searching for: MsgPack
===> Building: MsgPack:ver<0.0.7>:auth<github:azawawi>
===> Building [OK] for MsgPack:ver<0.0.7>:auth<github:azawawi>
===> Testing: MsgPack:ver<0.0.7>:auth<github:azawawi>
[MsgPack] # ${:major(3), :minor(2), :string("3.2.1")}
[MsgPack] # TODO Fix positive integer tests
[MsgPack] # TODO Fix negative integer tests
[MsgPack] # Failed test 'hash packed correctly'
[MsgPack] # at t/107-pack-hash.t line 10
[MsgPack] # Failed test 'hash packed correctly'
[MsgPack] # at t/107-pack-hash.t line 16
[MsgPack] # You failed 2 tests of 3
===> Testing [FAIL]: MsgPack:ver<0.0.7>:auth<github:azawawi>
Aborting due to test failure: MsgPack:ver<0.0.7>:auth<github:azawawi> (use --force-test to override)

Version: msgpack-devel-3.2.1_1

Tests are failing (likely) due to hash randomization

➜  ~ zef install MsgPack
===> Searching for: MsgPack
===> Building: MsgPack:ver<0.0.7>:auth<github:azawawi>
===> Building [OK] for MsgPack:ver<0.0.7>:auth<github:azawawi>
===> Testing: MsgPack:ver<0.0.7>:auth<github:azawawi>
# ${:major(3), :minor(0), :string("3.0.1")}
# TODO Fix positive integer tests
# TODO Fix negative integer tests
# Failed test 'hash packed correctly'
# at t/107-pack-hash.t line 10
# Failed test 'hash packed correctly'
# at t/107-pack-hash.t line 16
# Looks like you failed 2 tests of 3
===> Testing [FAIL]: MsgPack:ver<0.0.7>:auth<github:azawawi>
Aborting due to test failure: MsgPack:ver<0.0.7>:auth<github:azawawi> (use --force-test to override)

On 2018.06 rakudo.

Likely due to https://cry.nu/perl6/secure-hashing-for-moarvm/.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.