Vec<u8>, string, wasm_bindgen, JS

  1. Every Rust string can be converted to a Vec<u8>.

  2. Not all Rust Vec<u8>, interpreted literally, are valid Rust strings.

  3. When doing Rust/JS ffi, we have Rust string <-> JS string

  4. When doing Rust/JS ffi, what is the idiomatic way for handling a Rust Vec<u8> ?

Thanks!

ArrayBuffer probably?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.