16 releases (9 breaking)

0.10.0 Mar 16, 2025
0.9.0 Sep 23, 2023
0.8.0 Apr 3, 2022
0.7.0 Mar 23, 2022
0.3.3 Jun 3, 2016

#440 in Encoding

Download history 1012/week @ 2025-03-17 890/week @ 2025-03-24 636/week @ 2025-03-31 497/week @ 2025-04-07 521/week @ 2025-04-14 621/week @ 2025-04-21 748/week @ 2025-04-28 674/week @ 2025-05-05 773/week @ 2025-05-12 697/week @ 2025-05-19 533/week @ 2025-05-26 524/week @ 2025-06-02 396/week @ 2025-06-09 523/week @ 2025-06-16 448/week @ 2025-06-23 394/week @ 2025-06-30

1,779 downloads per month
Used in 7 crates (4 directly)

MIT license

85KB
2.5K SLoC

Library for encoding/decoding Erlang External Term Format.

Examples

Decodes an atom:

use std::io::Cursor;
use eetf::{Term, Atom};

let bytes = vec![131, 100, 0, 3, 102, 111, 111];
let term = Term::decode(Cursor::new(&bytes)).unwrap();
assert_eq!(term, Term::from(Atom::from("foo")));

Encodes an atom:

use eetf::{Term, Atom};

let mut buf = Vec::new();
let term = Term::from(Atom::from("foo"));
term.encode(&mut buf).unwrap();
assert_eq!(vec![131, 100, 0, 3, 102, 111, 111], buf);

Reference


eetf

eetf Documentation Actions Status License: MIT

A Rust implementation of Erlang External Term Format.

Documentation

See RustDoc Documentation.

The documentation includes some examples.

Dependencies

~3.5MB
~51K SLoC