jsturtevant opened issue #11450:
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.aotCaused by: module was compiled without GC but GC is enabled in the hostExpected 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 hostVersions 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=nosettings 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 https://github.com/bytecodealliance/wasmtime/pull/10455#discussion_r2008287118 and wasn't sure what the correct solution is here.
jsturtevant added the bug label to Issue #11450.
alexcrichton commented on issue #11450:
Thanks for the report! I've put up https://github.com/bytecodealliance/wasmtime/pull/11463 to propose addressing this which would make it easier to match features in this case.
fitzgen closed issue #11450:
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.aotCaused by: module was compiled without GC but GC is enabled in the hostExpected 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 hostVersions 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=nosettings 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 https://github.com/bytecodealliance/wasmtime/pull/10455#discussion_r2008287118 and wasn't sure what the correct solution is here.
Last updated: Dec 06 2025 at 06:05 UTC