Stream: wasmtime

Topic: Pulley support in hyperlight-wasm (no-std)


view this post on Zulip Doru Blânzeanu (Feb 03 2026 at 11:05):

Hello,

I am trying to run modules/components compiled for pulley64 in hyperlight-wasm.
In hyperlight-wasm, the guest side uses wasmtime with only the following features enabled: ["runtime", "custom-virtual-memory", "custom-native-signals", "component-model"]. It is build for x86_64-unknown-none.

From what I understand from the wasmtime features, pulley support should be already enabled:

pulley = [
       # Note that this is intentionally empty. This feature is dynamically activated
       # in `build.rs` as well when the host platform does not have Cranelift support
       # for example. That means that dependencies for pulley need to be already
       # activated anyway.
     ]

I am pre-compiling the modules/components using wasmtime features = ["cranelift", "pulley", "runtime", "component-model" ] and target pulley64, but when running I am getting the following errors:
For wasmtime 36.0.5 (we are using LTS version):

Exception: InvalidOpcode | Exception vector: 6
           Faulting Instruction: 0x100005297
           Page Fault Address: 0x0
           Error code: 0x0
           Stack Pointer: 0x23a450x23a330"

I tried a newer version, wasmtime 41.0.0:

Error: compilation settings are not compatible with the native host
           Caused by:
                target 'pulley64-unknown-unknown-elf' specified in the configuration does not match the host"

Do you spot something I might be doing wrongly?

view this post on Zulip Antoine Lavandier (Feb 03 2026 at 12:54):

Not a wasmtime develpoper, but I remember pulley having issue with trying to use a no-std target in an std environment. IIRC using the cranelift features enables the std feature. Does removing this feature help ?

view this post on Zulip Doru Blânzeanu (Feb 03 2026 at 12:58):

I tried removing cranelift from wasmtime when pre-compiling the modules/components, but the precompile_module and precompile_component APIs from wasmtime were no longer exposed.

I haven't seen any other option to precompile when cranelift was not enabled

view this post on Zulip Antoine Lavandier (Feb 03 2026 at 13:24):

Oh sorry, I misread your message, I thought that you were running the module in std contexts. I checked on what I did that worked and I just used config.target("pulley64") on both sides (precompilation and running). I assume that this is also what you do ?

view this post on Zulip Doru Blânzeanu (Feb 03 2026 at 13:33):

Partly.
I am setting config.target("pulley64") when compiling and running, but the part that's running it is built for no-std (x86_64-unknown-none) and I cannot set features = [ "pulley" ] because that needs std.

The docs and wasmtime Cargo.toml specify that when runtime is enabled, but cranelift is NOT, pulley is enabled by default (no need for the feature).
I don't know if I understand it correctly, should I be able to run modules/components pre-compiled to pulley64 in my conditions?

view this post on Zulip Doru Blânzeanu (Feb 03 2026 at 13:40):

After reading more thoroughly, the docs I linked say that on supported architectures cranelift is by default used (x86_64 and aarch64), so maybe that's why I see this behaviour.
Then my question is, is there a way to make pulley work on no-std?

view this post on Zulip Antoine Lavandier (Feb 03 2026 at 13:58):

I definitely does work in no_std. Does it help to select pulley 64 explicitely instead of relying on the automatic detection ?

view this post on Zulip Doru Blânzeanu (Feb 03 2026 at 14:02):

I tried again from scratch (new checkout) with a module and it worked. I don't know what I had done, maybe I had some leftover changes.
I'll try with components also.
Thank you for the help!


Last updated: Feb 24 2026 at 04:36 UTC