Stream: git-wasmtime

Topic: wasmtime / PR #14897 Disable wasm SIMD on riscv64 without...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 02:35):

ilyas-mallah opened PR #14897 from ilyas-mallah:riscv64-simd-no-v to bytecodealliance:main:

Follow-up to #13959 and #14524. Compiling a module that uses v128 for riscv64 without the V extension panics in the backend. wasmtime compile --target riscv64gc-unknown-linux-gnu with default flags hits it, and so does a native host without V. #14524 fixed the memcpy half of #13959, and this is the other half Alex mentioned in that issue.

On such targets SIMD and relaxed SIMD are now off by default, so these modules fail validation with "SIMD support is not enabled". Turning either one on explicitly makes Engine::new fail. The check isn't in compiler_panicking_wasm_features because that runs in Config::validate, before native ISA flags are detected.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 02:35):

ilyas-mallah removed the review request for wasmtime-compiler-reviewers from PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 02:35):

ilyas-mallah requested fitzgen for a review on PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 02:35):

ilyas-mallah requested wasmtime-compiler-reviewers for a review on PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 02:35):

ilyas-mallah requested wasmtime-core-reviewers for a review on PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 02:35):

ilyas-mallah requested wasmtime-default-reviewers for a review on PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 04:50):

github-actions[bot] added the label wasmtime:api on PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 04:50):

github-actions[bot] added the label wasmtime:docs on PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 04:50):

github-actions[bot] added the label wasmtime:config on PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 07:02):

github-actions[bot] commented on PR #14897:

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

[fuzzing-config]: https://github.com/bytecodealliance/wasmtime/blob/ca0e8d0a1d8cefc0496dba2f77a670571d8fdcab/crates/fuzzing/src/generators.rs#L182-L194
[fuzzing-docs]: https://docs.wasmtime.dev/contributing-fuzzing.html


<details>

To modify this label's message, edit the <code>.github/label-messager/wasmtime-config.md</code> file.

To add new label messages or remove existing label messages, edit the
<code>.github/label-messager.json</code> configuration file.

Learn more.

</details>

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 14:11):

:memo: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 14:11):

:speech_balloon: alexcrichton created PR review comment:

I think this might be best to invert a little bit with the way features work:

That way it'll be off-by-default for the relevant targets, and if users explicitly-opt in they'll still get an error.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 14:42):

ilyas-mallah updated PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 14:43):

:memo: ilyas-mallah submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 14:43):

ilyas-mallah edited PR #14897:

Follow-up to #13959 and #14524. Compiling a module that uses v128 for riscv64 without the V extension panics in the backend. wasmtime compile --target riscv64gc-unknown-linux-gnu with default flags hits it, and so does a native host without V. #14524 fixed the memcpy half of #13959, and this is the other half Alex mentioned in that issue.

On such targets SIMD and relaxed SIMD are now off by default, so these modules fail validation with "SIMD support is not enabled". Turning either one on explicitly makes Engine::new fail. Both are listed in compiler_panicking_wasm_features when the compiler can't compile v128. Native ISA flags are only detected once the compiler is built, so build_compiler runs that check again after the build.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 14:44):

:speech_balloon: ilyas-mallah created PR review comment:

Makes sense to route it through the same path as the other unsupported features, so I moved it into the panicking set in https://github.com/bytecodealliance/wasmtime/commit/6cb80301aa1cc5543692b1db2fcb855752189832.

The one difference is that Config::validate calls compiler_panicking_wasm_features before a compiler exists, so it takes a compiler_supports_simd flag instead of the compiler. validate passes true. build_compiler repeats the check with compiler.supports_wasm_simd() once the ISA flags are known, and Engine::new takes its features from that second pass.

If you'd rather it take the compiler directly, an Option<&dyn Compiler> works too, but it needs cfg gates in config.rs.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 15:01):

:memo: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 15:02):

:speech_balloon: alexcrichton created PR review comment:

Ah I see, in that case I think the best we can do is what you had previously which is to just validate that simd/relaxed-simd aren't enabled when riscv64 without has_v is targeted. I think the checks added to mesh this with what we currently have are unfortunately a bit too convoluted.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 15:14):

ilyas-mallah edited PR #14897:

Follow-up to #13959 and #14524. Compiling a module that uses v128 for riscv64 without the V extension panics in the backend. wasmtime compile --target riscv64gc-unknown-linux-gnu with default flags hits it, and so does a native host without V. #14524 fixed the memcpy half of #13959, and this is the other half Alex mentioned in that issue.

On such targets SIMD and relaxed SIMD are now off by default, so these modules fail validation with "SIMD support is not enabled". Turning either one on explicitly makes Engine::new fail. The check isn't in compiler_panicking_wasm_features because that runs in Config::validate, before native ISA flags are detected.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 15:16):

:speech_balloon: alexcrichton created PR review comment:

This documentation will need to be updated -- it's not disabled by default on riscv64 but rather it's enabled-by-default and also requires-has_v-by-default, meaning if --target is used it must be combined with has_v or -Wsimd=n

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 15:17):

:speech_balloon: ilyas-mallah created PR review comment:

Agreed, the second pass was more machinery than it's worth. I reverted it in https://github.com/bytecodealliance/wasmtime/commit/c1e0c228107c43cef7cc81d9ea902ef2e7f2594c, so build_compiler errors on an explicit simd/relaxed-simd and otherwise drops them from the default features.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 15:23):

:memo: ilyas-mallah submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 15:24):

ilyas-mallah updated PR #14897.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 15:24):

:speech_balloon: alexcrichton created PR review comment:

I don't think this .remove(..) call is necessary? Ideally the signature of this function does not change

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 15:25):

:memo: alexcrichton submitted PR review.


Last updated: Oct 31 2026 at 23:03 UTC