Stream: git-wasmtime

Topic: wasmtime / PR #10727 pulley: Allow disabling SIMD in the ...


view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 14:33):

alexcrichton opened PR #10727 from alexcrichton:compile-away-pulley-simd to bytecodealliance:main:

This commit adds a new feature to Pulley which is used to reduce the compiled code size of the interpreter itself by disabling SIMD opcode interpretation at compile-time. The goal here is to be low-impact on Pulley itself to avoid needing #[cfg] all over the place and to additionally avoid the need to redesign Pulley's opcode macro for use in various parts of Wasmtime.

Methods are annotated with a custom macro in the interpreter which registers a #[cfg] that either does the listed implementation or switches to an implementation that emits a trap if executed. This means that it's safe to execute mismatched code where SIMD was enabled at compile time but disabled at runtime, it just means the semantics may be a bit surprising to debug.

Note that this SIMD is still enabled by default, and an explicit --cfg via RUSTFLAGS is required to compile-out the SIMD support. Cargo features aren't a great fit for this sort of feature so an explicit flag is used.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 14:33):

alexcrichton requested wasmtime-default-reviewers for a review on PR #10727.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 14:33):

alexcrichton requested wasmtime-core-reviewers for a review on PR #10727.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 14:33):

alexcrichton requested pchickey for a review on PR #10727.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 14:36):

alexcrichton updated PR #10727.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 15:45):

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

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "pulley", "wasmtime:api", "wasmtime:docs"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 16:06):

alexcrichton commented on PR #10727:

I gathered some numbers in https://github.com/google/wasefire/issues/458#issuecomment-2851490398 and for that particular embedding this is a 10% reduction in text size when compiled with --release and a 5% reduction in text size when compiled with opt-level=z

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 16:07):

alexcrichton edited a comment on PR #10727:

I gathered some numbers in https://github.com/google/wasefire/issues/458#issuecomment-2851490398 and for that particular embedding this is a 10% reduction in text size (44k) when compiled with --release and a 5% reduction in text size (14k) when compiled with opt-level=z

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 16:14):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 17:56):

alexcrichton updated PR #10727.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 17:56):

alexcrichton has enabled auto merge for PR #10727.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 19:40):

alexcrichton updated PR #10727.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 20:20):

alexcrichton updated PR #10727.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 20:22):

alexcrichton has enabled auto merge for PR #10727.

view this post on Zulip Wasmtime GitHub notifications bot (May 05 2025 at 20:54):

alexcrichton merged PR #10727.


Last updated: Dec 06 2025 at 06:05 UTC