https://github.com/azawawi/perl6-msgpack
Perl 6 Interface to libmsgpack
https://github.com/azawawi/perl6-msgpack
data messagepack msgpack perl6 wrapper
Last synced: about 1 year ago
JSON representation
Perl 6 Interface to libmsgpack
- Host: GitHub
- URL: https://github.com/azawawi/perl6-msgpack
- Owner: azawawi
- License: mit
- Created: 2017-11-02T18:32:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-04T12:14:54.000Z (almost 8 years ago)
- Last Synced: 2025-03-14T01:22:13.361Z (over 1 year ago)
- Topics: data, messagepack, msgpack, perl6, wrapper
- Language: Perl 6
- Size: 61.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MsgPack
[](https://travis-ci.org/azawawi/perl6-msgpack) [](https://ci.appveyor.com/project/azawawi/perl6-msgpack/branch/master)
Perl 6 Interface to libmsgpack
## Example
```Perl6
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](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](https://github.com/jonathanstowe/Test-META) is installed):
```
$ zef install Test::META
$ AUTHOR_TESTING=1 prove -e "perl6 -Ilib"
```
## See Also
- [Data::MessagePack](https://github.com/pierre-vigier/Perl6-Data-MessagePack/)
Most of the excellent tests here are based of the work of
[Pierre Vigier](https://github.com/pierre-vigier/).
Thanks for creating an excellent pure Perl 6 reference implementation.
## Author
Ahmad M. Zawawi, [azawawi](https://github.com/azawawi/) on #perl6
## License
MIT License