winch/README.md
<strong>A <a href="https://bytecodealliance.org/">Bytecode Alliance</a> project</strong>
<p> <a href="https://github.com/bytecodealliance/wasmtime/actions?query=workflow%3ACI"></a> <a href="https://bytecodealliance.zulipchat.com/#narrow/stream/417703-winch"></a><a href="https://docs.rs/winch-codegen"></a>
Winch is a WebAssembly "baseline" or single-pass compiler designed for Wasmtime.
Winch's primary goal is compilation performance, therefore only certain, very limited peephole optimizations are applied.
For more details on the original motivation and goals, refer to the Bytecode Alliance RFC for Baseline Compilation in Wasmtime..
Single pass over Wasm bytecode
Function as the unit of compilation
Machine code generation directly from Wasm bytecode – no intermediate representation
Avoid reinventing machine-code emission – use Cranelift's instruction emitter code to create an assembler library
Prioritize compilation performance over runtime performance
Simple to verify by looking. It should be evident which machine instructions are emitted per WebAssembly operator
Adding and iterating on new (WebAssembly and developer-facing) features should be simpler than doing it in an optimizing tier (Cranelift)
Winch's aim is to support all the backends officially supported by Wasmtime:
The x86_64 backend offers an almost-complete implementation, it currently supports all the instructions that are part of WebAssembly's MVP, plus some of the feature extensions. Refer to the Tiers of Support for more details.