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
cargo run --features all-arch -- explore --target riscv64 crates/c-api/wasm-c-api/example/hello.wasm
If your native host is actually a riscv64 system, replace the target with something else such as x86_64.
Expected Results
Exploration written to crates/c-api/wasm-c-api/example/hello.explore.html
Actual Results
Error: compilation settings are not compatible with the native host
Caused by:
target 'riscv64-unknown-unknown' specified in the configuration does not match the host
Based on the error messages, apparently wasmtime explore winds up in Engine::check_compatible_with_native_host by way of Module::from_binary. I don't understand why this mode would use that path though.
Found this together with @michelledaviest while trying to understand some profiling results.
The text was updated successfully, but these errors were encountered:
jameysharp
added
the
bug
Incorrect behavior in the current implementation that needs fixing
label
Jul 12, 2023
The reason for this is due to this line where a Module is created and a Module is "proof of ready to run" which in a cross-compiled case is impossible since the native platform is never ready to run a different platform. Awhile back this is why Engine::precompile_module was added which skips "is this ready to run" checks and is suitable for cross-compilation (or enabling more features than the host has, stuff like that).
The problem here though is that Module has a good deal of useful metadata about the module that precompile_module doesn't return (it just returns a Vec<u8>). One option though would be to return -> Result<PrecompiledModule> which packages up all the necessary information.
Steps to Reproduce
If your native host is actually a
riscv64
system, replace the target with something else such asx86_64
.Expected Results
Actual Results
Versions and Environment
Wasmtime version or commit: c34567c
Operating system: Linux
Architecture: x86-64
Extra Info
Based on the error messages, apparently
wasmtime explore
winds up inEngine::check_compatible_with_native_host
by way ofModule::from_binary
. I don't understand why this mode would use that path though.Found this together with @michelledaviest while trying to understand some profiling results.
The text was updated successfully, but these errors were encountered: