Skip to content

Running wasmtime demo fails when built with cg_clif #1230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vi opened this issue Jun 12, 2022 · 3 comments
Closed

Running wasmtime demo fails when built with cg_clif #1230

vi opened this issue Jun 12, 2022 · 3 comments
Labels
A-core-arch Area: Necessary for full core::arch support C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@vi
Copy link
Contributor

vi commented Jun 12, 2022

If built with rustc_codegen_cranelif's Cargo wrapper, wasmtime's "Hello world" (with wasmtime = "0.36.0") outputs:

Error: compilation settings are not compatible with the native host

Caused by:
    compilation setting "has_sse3" is enabled but not available on the host

If I use usual Cargo, I get:

Answer: 42

cg_clif's Rust version: cargo 1.62.0-nightly (a44758ac8 2022-05-04), repo version: 343c532.
Usual Rust version: cargo 1.63.0-nightly (a4c1cd0eb 2022-05-18).

@vi vi changed the title Building wasmtime demo fails with cg_clif Running wasmtime demo fails when built with cg_clif Jun 12, 2022
@bjorn3
Copy link
Member

bjorn3 commented Jun 12, 2022

Try using the main branch of wasmtime and I think disabling support for the simd wasm feature. Cg_clif fakes a cpuid output to disable most target features as the corresponding intrinsics aren't implemented yet. Wasmtime requires sse4.1 I believe when simd support is enabled. Also there was recently a fix for wasmtime requiring sse4.1 even when simd support is disabled. This fix isn't yet included in any released version of wasmtime

@bjorn3 bjorn3 added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-core-arch Area: Necessary for full core::arch support labels Jun 14, 2022
@bjorn3 bjorn3 closed this as completed in 55380a5 Oct 22, 2023
@bjorn3
Copy link
Member

bjorn3 commented Oct 22, 2023

Fixed in 55380a5. The entire wasmtime test suite passes now with the exception of the tests that test panics as cg_clif doesn't yet support unwinding on panics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core-arch Area: Necessary for full core::arch support C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

2 participants