-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
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
Steps to Reproduce
Write a library that compiles your component with the following features from wasmtime:
wasmtime = { version="34", default-features = false, features = ["cranelift", "runtime", "component-model" ] }
let mut config = Config::new();
let engine = Engine::new(&config).unwrap();
let bytes = std::fs::read(infile).unwrap();
let serialized = if args.get_flag("component") {
engine.precompile_component(&bytes).unwrap()
} else {
engine.precompile_module(&bytes).unwrap()
};
Then try and run it in in wasmtime, turning off GC in the host, it fails to run:
wasmtime run -W gc=no -W component-model-gc=no --target x86_64-unknown-none --allow-precompiled --invoke 'echo("hi")' /home/jstur/projects/hyperlight-wasm/x64/debug/runcomponent.aot
Caused by:
module was compiled without GC but GC is enabled in the host
Expected Results
I would expect that I can turn the features off and run them.
Actual Results
error module was compiled without GC but GC is enabled in the host
Versions and Environment
Wasmtime version or commit: any released version
Operating system: TODO
Architecture: TODO
Extra Info
Anything else you'd like to add?
I tracked it down to this being always on via build flag even though -W gc=no -W component-model-gc=no
settings are turned off and causing a failure later on in processing.
I moved this logic to use the gc flag and things worked. Then I found #10455 (comment) and wasn't sure what the correct solution is here.