Bincode Javascript

Hi,

Anyone have a working example on how to do:

I literally need the same thing than the serialization here but in JS.

let encoded: Vec<u8>        = serialize(&target, limit).unwrap();

After that, i'll send it through websockets and receiver (Rust server) will deserialize it (with bincode)

Thanks guys! :slight_smile:

When I checked a couple months ago, there didn't appear to be any implementations of bincode in other languages (it's not an existing standard, but a Rust thing from Servo). Consider using serde_json to pass data to JavaScript.

I believe you can use wasm-bindgen and process the array buffer of the response result from a fetch request.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.