Description
erlpack is a fast encoder and decoder for the Erlang Term Format, version 131, for Python and JavaScript. It turns data into the binary format that Erlang uses and turns that binary back into native values. In JavaScript it packs null, booleans, strings, floats, integers, objects and arrays, and it unpacks from a Uint8Array or Buffer. Atoms, tuples, PIDs, ports, references and integers over 64 bits are not yet supported in JavaScript. In Python it also packs None, lists, tuples, dictionaries, longs and atoms, and it supports user types through an encode hook, so you can make your own classes packable. The README includes examples for packing and unpacking in each language. It has a note for Electron and libchromium, where a custom buffer type must be converted to a Node buffer before erlpack can use it, and it explains how to build the C++ files for the Python package. The project is published by Discord, which has moved away from Go internally, so it does not maintain a Go version and points to a community port. The source is public on GitHub under the discord organization. It is for developers who need to exchange data with Erlang systems from Python or JavaScript.…
Highlights
- Erlang Term Format version 131 encoder and decoder
- Python and JavaScript support
- Python encode hook for custom types
- Electron buffer conversion note
Ratings & Reviews
No ratings yet
Be the first to rate Erlpack.
People also visit
Quickbeam
JavaScript runtime for the BEAM — Web APIs backed by OTP, native DOM, and a…
Erlpack FAQ
What is erlpack?
It is a fast encoder and decoder for the Erlang Term Format, for Python and JavaScript.
Which data types are not supported?
In JavaScript, atoms, tuples, PIDs, ports, exports, references and longs over 64 bits are listed as not supported. The README lists the Python types too.
Does it work in Electron?
Yes, with a conversion step. The README explains that a custom buffer type from libchromium must be converted to a Node buffer first.
Is there a Go version?
Discord does not maintain one. The README points to a community Go port instead.
What are the best Erlpack alternatives?
Popular alternatives to Erlpack include Erlexec, Packages and Packager. See all Erlpack alternatives


