#erlang #serde #elixir #serialization #eetf

serde_eetf

Erlang external term format support for serde

2 unstable releases

0.2.0 May 23, 2019
0.1.0 Oct 12, 2018

#1448 in Encoding

Download history 4/week @ 2024-02-19 20/week @ 2024-02-26 2/week @ 2024-03-04 14/week @ 2024-03-11 24/week @ 2024-03-18 12/week @ 2024-03-25 41/week @ 2024-04-01

92 downloads per month
Used in erlang_port

MIT license

48KB
1.5K SLoC

serde_eetf

Erlang external term format support for serde. This allows a rust app to easily talk to erlang, elixir or any other BEAM language with little boilerplate.


lib.rs:

Erlang external term format support for serde. This allows a rust app to easily talk to erlang, elixir or any other BEAM language with little boilerplate.

use serde_eetf::{to_bytes, from_bytes};

#[derive(Deserialize, Serialize, PartialEq, Debug)]
struct Test {
    x: i8
}

let input = Test{ x: 8 };
// Here we convert our Test struct into some bytes that could be sent to
// Erlang.
let bytes = to_bytes(&input).unwrap();

// When we receive a response from Erlang we can convert it back to our Test
// struct.
let result: Test = from_bytes(&bytes).unwrap();

Dependencies

~2.5MB
~43K SLoC