JMLX42 added the bug label to Issue #7653.
JMLX42 opened issue #7653:
Thanks for filing a bug report! Please fill out the TODOs below.
Note: if you want to report a security issue, please read our security policy!
Test Case
add.wasm
: add.zipSteps to Reproduce
let engine = Engine::default(); let module = Module::from_binary(&engine, &data).expect("Failed to load module"); let mut store = Store::new(&engine, ()); let instance = Instance::new(&mut store, &module, &[])?; let answer = instance .get_func(&mut store, "add") .expect("`add` was not an exported function");
Expected Results
Module::from_binary()
returns aOk(Module)
.Actual Results
Panic!
thread 'main' panicked at crates/wasm2openapi/src/main.rs:186:54: Failed to load module: failed to parse WebAssembly module Caused by: Invalid input WebAssembly code at offset 0: unknown binary version and encoding combination: 0xd and 0x1, note: encoded as a component but the WebAssembly component model feature is not enabled - enable the feature to allow component validation note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Versions and Environment
For the
add.wasm
component:cargo-component-bindings = "0.5.0"
For the host app:
wasmtime = { version = "15.0.1", features = ["component-model"] }
Operating system: Ubuntu 22.04
Architecture: 64bit
Extra Info
Trying to dynamically call WASM Component exported functions via HTTP: https://github.com/JMLX42/wasm2openapi
JMLX42 edited issue #7653:
Test Case
add.wasm
: add.zipSteps to Reproduce
let engine = Engine::default(); let module = Module::from_binary(&engine, &data).expect("Failed to load module"); let mut store = Store::new(&engine, ()); let instance = Instance::new(&mut store, &module, &[])?; let answer = instance .get_func(&mut store, "add") .expect("`add` was not an exported function");
Expected Results
Module::from_binary()
returns aOk(Module)
.Actual Results
Panic!
thread 'main' panicked at crates/wasm2openapi/src/main.rs:186:54: Failed to load module: failed to parse WebAssembly module Caused by: Invalid input WebAssembly code at offset 0: unknown binary version and encoding combination: 0xd and 0x1, note: encoded as a component but the WebAssembly component model feature is not enabled - enable the feature to allow component validation note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Versions and Environment
For the
add.wasm
component:cargo-component-bindings = "0.5.0"
For the host app:
wasmtime = { version = "15.0.1", features = ["component-model"] }
Operating system: Ubuntu 22.04
Architecture: 64bit
Extra Info
Trying to dynamically call WASM Component exported functions via HTTP: https://github.com/JMLX42/wasm2openapi
Last updated: Nov 22 2024 at 17:03 UTC