Stream: git-wasmtime

Topic: wasmtime / issue #10222 Compilation to webassembly


view this post on Zulip Wasmtime GitHub notifications bot (Feb 12 2025 at 14:42):

olynch opened issue #10222:

Feature

Provide a webassembly codegen backend for cranelift, in parallel to the x86_64, aarch64, etc. backends.

Benefit

  1. This would enable compilers that target CLIF to also produce WASM; specifically debug builds for rustc could target WASM.
  2. Cranelift could be used as a WASM-to-WASM optimizer like binaryen.

Implementation

Unfortunately, I don't have an implementation plan and I probably would not work on this, but I would use this in a compiler if it existed.

Alternatives

Compilers could instead emit WASM directly, and then pass that WASM through cranelift to achieve native compilation and optimize it with binaryen for WASM output.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 12 2025 at 14:50):

bjorn3 commented on issue #10222:

Duplicate of https://github.com/bytecodealliance/wasmtime/issues/2566

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

cfallin closed issue #10222:

Feature

Provide a webassembly codegen backend for cranelift, in parallel to the x86_64, aarch64, etc. backends.

Benefit

  1. This would enable compilers that target CLIF to also produce WASM; specifically debug builds for rustc could target WASM.
  2. Cranelift could be used as a WASM-to-WASM optimizer like binaryen.

Implementation

Unfortunately, I don't have an implementation plan and I probably would not work on this, but I would use this in a compiler if it existed.

Alternatives

Compilers could instead emit WASM directly, and then pass that WASM through cranelift to achieve native compilation and optimize it with binaryen for WASM output.


Last updated: Feb 28 2025 at 02:27 UTC