MsgPack
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
libmsgpackon 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 
msgpackdevelopment headers / libraries, please run: 
$ sudo apt-get install libmsgpack-dev
macOS
- To install 
msgpackdevelopment 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
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