Closed
Description
wasm_bindgen! {
pub fn parse_data(data: &[u8]) -> i32 {
data.len() as i32
}
}
Returns
unsupported reference type
I'm hoping that you'd be open to more borrowed types (specifically &[u8]
) in addition to BorrowedStr. This could be part of a larger issue to support Vec and other slices, but I figure &[u8]
might be easiest and would be implemented very closely to BorrowedStr.
Use case:
After I use a FileReader to read a binary file into an ArrayBuffer and create WebAssembly.Memory (I believe that flow is correct), I want to send the data to rust for parsing.
Metadata
Metadata
Assignees
Labels
No labels