#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

#1451 in Encoding

Download history 4/week @ 2024-02-18 19/week @ 2024-02-25 2/week @ 2024-03-03 14/week @ 2024-03-10 25/week @ 2024-03-17

60 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
~44K SLoC