You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Rust library that calls a wasm library. Currently I include_bytes! the wasm bytecode. It is going to run on mobile devices, so reducing resources is important. I would like to statically compile and link the bytecode.
Additional details
I tried
constWASM_STATICLIB:&[u8] = include_bytes!("wasm_staticlib.o");let store = Store::new(&Staticlib::headless().engine());let module = unsafe{Module::deserialize(&store,WASM_STATICLIB).unwrap()};
but this panics with
wasm should be valid: CorruptedBinary("misaligned metadata")
This happens no matter if the .o file is created using Module::serialize or the wasmer CLI:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Summary
I have a Rust library that calls a wasm library. Currently I
include_bytes!
the wasm bytecode. It is going to run on mobile devices, so reducing resources is important. I would like to statically compile and link the bytecode.Additional details
I tried
but this panics with
This happens no matter if the
.o
file is created usingModule::serialize
or the wasmer CLI:The text was updated successfully, but these errors were encountered: