Skip to content
CAI
Software that uses CAICheck a score

bytecodealliance/wasmtime

66.5

Adequate · 27 September 2026

507.9k

lines of production code

Rust

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is Wasmtime, a WebAssembly runtime that compiles and executes WebAssembly modules using the Cranelift JIT compiler. It provides a comprehensive infrastructure for translating WebAssembly into native machine code or Pulley bytecode across multiple architectures, including x86\_64, AArch64, RISC-V, and s390x. The system supports advanced features such as the WebAssembly Component Model, garbage-collected reference types, and asynchronous debugging, while offering C/C++ and Rust APIs for embedding.

How it got here

2016–2020 — Cranelift infrastructure and Wasmtime modularization

79 changes.

This period focused on rebuilding Cranelift's internal infrastructure by migrating code generation and metadata definitions from Python to Rust, while introducing the ISLE lowering engine and a new machine backend. Simultaneously, Wasmtime underwent significant architectural changes, including restructuring the CLI into modular subcommands, consolidating the runtime engine, and establishing comprehensive fuzzing and testing frameworks to support emerging WebAssembly features like the Component Model and Garbage Collection.

2021–2023 — ISLE migration and component model expansion

67 changes.

This period focused on migrating Cranelift's instruction lowering logic to the ISLE framework across x64, s390x, and RISC-V backends, while introducing a new egraph-based mid-end optimizer. Simultaneously, the project significantly expanded its WebAssembly Component Model support through the FACT adapter compiler, WIT bindings, and WASI Preview 1/2 adapters, alongside the introduction of the Winch JIT compiler.

2024–2025 — WASI Preview 2/3 and Component Model expansion

64 changes.

This period focused on implementing the WASI Preview 2 and experimental Preview 3 specifications, introducing new crates for key-value, TLS, and config APIs alongside comprehensive socket and filesystem support. Significant effort was also directed toward the WebAssembly Component Model, including the introduction of the Pulley portable bytecode interpreter, robust C/C++ API bindings, and extensive async execution infrastructure.

2026 — Fallible memory and formal verification

16 changes.

This period focused on introducing fallible allocation types across the core and environment layers to enable graceful handling of out-of-memory conditions, supported by expanded fuzzing tests. Concurrently, significant effort was directed toward formal verification of Cranelift's AArch64 semantics and mid-end optimizations using the ISLE toolchain, alongside enhancements to the debugger and WASI filesystem implementations.

Features

Add C API support for WebAssembly GC reference types

The C API now exposes functions to create, inspect, and manipulate WebAssembly GC reference types, including \anyref\, \eqref\, \arrayref\, \structref\, and \exnref\. This allows host applications to pass these reference types across the boundary, downcast them to specific subtypes (such as extracting an \i31\ value or accessing array elements), and handle exceptions via the new \exnref\ type.

crates/c-api/src · high confidence

Add Cranelift umbrella crate for simplified integration

A new umbrella crate has been added to provide a single dependency entry point for the Cranelift compiler infrastructure. This crate re-exports key sub-crates (such as codegen, frontend, interpreter, jit, module, native, and object) under simplified names and exposes a prelude module containing commonly used types and traits, allowing users to integrate Cranelift with a single import statement.

cranelift/umbrella · high confidence

Add OCaml FFI shim for WebAssembly spec interpreter fuzzing

This change introduces a new OCaml library in the \crates/fuzzing/wasm-spec-interpreter/ocaml\ directory that provides Foreign Function Interface (FFI) access to the WebAssembly specification interpreter. It includes a build system (Makefile) to compile the interpreter and a shim layer (\interpret.ml\) that exposes functions for parsing WebAssembly modules, instantiating them, retrieving exports, and interpreting exported functions with optional parameters. This component serves as the bridge allowing Rust-based fuzzing infrastructure to execute and verify WebAssembly code against the official spec interpreter.

crates/fuzzing/wasm-spec-interpreter/ocaml · high confidence

Add RISC-V 64-bit (riscv64) backend to Cranelift

Cranelift now includes a new backend for the RISC-V 64-bit architecture, enabling the compilation of WebAssembly modules to native RISC-V code. This change introduces the core backend infrastructure, including ABI handling for argument and return value placement, instruction selection and lowering rules defined in ISLE files, and support for RISC-V specific features such as vector extensions (V), compressed instructions (Zca/Zcb/Zcd), and various bit-manipulation extensions (Zba, Zbb, etc.). Users can now target RISC-V 64-bit systems directly using Cranelift.

cranelift/codegen/src/isa/riscv64 · high confidence

Add Rust interface to the WebAssembly spec interpreter

A new \wasm-spec-interpreter\ crate has been added to provide a Rust interface for executing WebAssembly modules using the official OCaml-based specification interpreter. This library allows fuzzing and testing workflows to validate WebAssembly execution against the canonical reference implementation by instantiating modules, invoking exported functions, and retrieving exports. The implementation uses the \ocaml-interop\ crate to bridge Rust and OCaml, ensuring thread safety via a global mutex to handle the non-reentrant OCaml runtime. It is designed to compile even when the OCaml toolchain is missing, panicking at runtime only if the interpreter is actually invoked without the required bindings.

crates/fuzzing/wasm-spec-interpreter/src · high confidence

Add WASI P3 CLI interface implementation

This change introduces the host-side implementation for the WASI P3 \wasi:cli\ world, providing support for standard input/output, error streams, and terminal capabilities. The new \host.rs\ module implements the \StreamProducer\ and \StreamConsumer\ traits to bridge asynchronous Rust I/O with the WebAssembly Component Model streams, handling errors by mapping them to specific error codes. The \mod.rs\ file exposes \add\_to\_linker\ and \add\_named\_to\_linker\ functions, allowing embedders to register these CLI interfaces with a Wasmtime linker, including support for named imports of CLI interfaces.

crates/wasi/src/p3/cli · high confidence

Add WASI P3 clocks implementation with named import support

This change introduces the host-side implementation for the WASI P3 clocks interfaces (\wasi:clocks/monotonic-clock\ and \wasi:clocks/system-clock\). It provides the core logic for retrieving current time and resolution, as well as asynchronous waiting mechanisms (\wait\_until\, \wait\_for\) using the Tokio runtime. Additionally, it adds support for named imports, allowing components to import specific clock instances by name via the new \add\_named\_to\_linker\ function and \WasiClocksNamedView\ trait.

crates/wasi/src/p3/clocks · high confidence

Add WASI P3 test program bindings for HTTP and Sockets

This change introduces a new \p3\ module in the test programs crate to support the WASI P3 (preview3) specification. It adds Rust bindings and helper utilities for \wasi:http\ (including client request/response handling and timeout configuration) and \wasi:sockets\ (including IP address utilities and UDP socket helpers). The module also includes a service implementation that wires these components together, enabling tests to exercise the new WASI P3 HTTP and Sockets interfaces.

crates/test-programs/src/p3 · high confidence

Add WASI-P2 plugin-based calculator example

A new example application has been added to the \examples/wasip2-plugins\ directory that demonstrates how to embed Wasmtime to support plugin-based architectures. The application implements a calculator host that dynamically loads WebAssembly components from a specified directory, allowing independent WASM modules to define custom binary operations. This provides a concrete reference for users looking to implement extensible systems using the WASI-P2 component model.

examples/wasip2-plugins · high confidence

Add Wasm spec interpreter fuzzing crate with OCaml FFI bridge

A new \wasm-spec-interpreter\ crate has been added to the fuzzing directory, enabling fuzzing against the WebAssembly specification interpreter. This crate implements a Rust-to-OCaml FFI bridge using \ocaml-interop\ to call into the OCaml-based spec interpreter. The build process automatically retrieves the spec repository from a custom fork (\conrad-watt/spec\ on the \wasmtime\_fuzzing\ branch) and pins it to a specific revision (\c6bab44\) to ensure reproducible builds. Users can build the static library and run tests by enabling the \build-libinterpret\ feature, which requires \make\, \ocamlopt\, \ocamlbuild\, and \libgmp\ in the build environment.

crates/fuzzing/wasm-spec-interpreter · high confidence

Add builtin GDB stub component for WebAssembly debugging

A new \gdbstub-component\ crate has been added to provide a built-in GDB/LLDB debugging interface for WebAssembly targets. This component implements the GDB remote protocol over TCP, allowing debuggers to attach to running Wasm instances. It exposes a synthesized address space that maps Wasm modules and linear memories, enabling features such as reading/writing memory, inspecting registers (specifically the program counter), setting software breakpoints, and retrieving memory maps and process information. The component is built as a Wasm module targeting \wasm32-wasip2\ and integrates with Wasmtime's internal debugger API to manage execution resumption and single-stepping.

crates/gdbstub-component · high confidence

Add clif-json utility for serializing and deserializing Cranelift IR to JSON

A new command-line tool, clif-json, is introduced to serialize Cranelift IR into JSON format and deserialize it back. The tool supports a \-p\ flag for pretty-printing the JSON output and handles parsing input files, though the deserialization process currently outputs the resulting data structure rather than fully reconstructing the original IR.

cranelift/serde · high confidence

Add component model trampoline compilation support

Introduces a new \TrampolineCompiler\ in \crates/cranelift/src/compiler/component.rs\ to handle the generation of trampoline code for the WebAssembly Component Model. This change enables the compilation of various trampoline types, including transcoding operations, lowering of host imports, and resource management calls (new/rep), by translating high-level component semantics into Cranelift IR with proper argument marshalling and alias region tracking.

crates/cranelift/src/compiler · high confidence

Add internal component model utility crate for type size calculations and memory allocation

A new internal-only crate, \crates/component-util\, has been added to support the Wasmtime component model implementation. This crate provides utilities for calculating the correct discriminant sizes for variant types and flags sizes for flag types, ensuring proper memory layout. It also includes a bump allocator implementation (\REALLOC\_AND\_FREE\) written in WebAssembly, which handles memory growth, alignment, and data copying for component adapter modules. The crate is marked as \no\_std\ and is intended for internal use within the Wasmtime project.

crates/component-util · high confidence

Add layout definitions for the copying, DRC, and null garbage collectors

The \crates/environ/src/gc\ module now includes layout implementations for three garbage collection strategies: the new semi-space copying collector (\copying.rs\), the deferred reference-counting collector (\drc.rs\), and the null collector (\null.rs\). These files define the object headers, alignment requirements, and field offsets for arrays, structs, and exceptions specific to each collector, enabling the environment layer to generate correct code for WebAssembly GC types under different memory management policies.

crates/environ/src/gc · high confidence

Add minimal JIT example demonstrating function definition and calling

A new \jit-minimal.rs\ example has been added to the \cranelift/jit/examples\ directory. This example demonstrates how to use the Cranelift JIT module to define two local functions (one calling the other), finalize the definitions, and execute the generated machine code from Rust. It serves as a basic reference for integrating Cranelift's JIT capabilities into applications.

cranelift/jit/examples · high confidence

Add reusable graph traversal and SCC analysis utilities

The \crates/environ/src/graphs\ module now provides reusable, iterative implementations for graph algorithms, specifically a Depth-First Search (DFS) traversal and Tarjan's algorithm for finding Strongly Connected Components (SCCs). This introduces \Dfs\ for iterating over graph nodes with pre/post/edge events, \EntityGraph\ for efficiently representing graphs of entity references, and \StronglyConnectedComponents\ for analyzing graph structure. These changes enable more robust and stack-safe graph analysis within the environment layer, supporting features that depend on control-flow or dependency graph inspection.

crates/environ/src/graphs · high confidence

Add s390x System V ABI unwind information support

Cranelift now generates DWARF-based unwind information for the s390x architecture under the System V ABI. This new module maps Cranelift integer and vector registers to their corresponding Gimli register IDs and defines the Common Information Entry (CIE) and Frame Description Entry (FDE) structures, enabling debuggers and crash handlers to correctly unwind s390x stacks. The implementation includes specific mappings for general-purpose registers (%r0–%r15) and vector registers, along with tests verifying the generated FDE instructions for simple and multi-return functions.

cranelift/codegen/src/isa/riscv64/inst/unwind, cranelift/codegen/src/isa/s390x/inst/unwind · high confidence

Add support for atomic read-modify-write operations in Cranelift IR

The Cranelift IR now includes an \AtomicRmwOp\ enum defining supported atomic read-modify-write operations (add, sub, and, nand, or, xor, exchange, unsigned/signed min/max). This change introduces the necessary IR infrastructure to represent atomic memory operations, enabling frontends and backends to handle atomic instructions with these specific arithmetic and logical variants.

cranelift/codegen/src/ir · high confidence

Add wasi-keyvalue crate with in-memory store support

Wasmtime now includes the \wasi-keyvalue\ crate, providing a host implementation of the WASI Key-Value API (version 0.2.0-draft). This enables WebAssembly components to perform CRUD, atomic, and batch operations on key-value stores. The initial release supports an in-memory backend, allowing guest code to read, write, and delete data within the runtime's memory space.

crates/wasi-keyvalue · high confidence

Add x64 unwind information generation for System V and Windows ABIs

Cranelift now generates DWARF/Unwind information for x86-64 code, enabling proper stack unwinding for debugging and exception handling on Linux (System V ABI) and Windows (x64 ABI). This change introduces register mapping logic for general-purpose and XMM registers and creates Common Information Entries (CIEs) and Frame Description Entries (FDEs) that describe frame layout, allowing debuggers and crash reporters to correctly walk the stack.

cranelift/codegen/src/isa/x64/inst/unwind · high confidence

Added Cranelift codegen support for WebAssembly stack switching

This change introduces the internal Cranelift infrastructure required to compile WebAssembly functions that use stack switching (continuations). It adds new modules to handle control effects (encoding resume, suspend, and trap signals), manage fat pointers for continuation objects, and emit the actual stack-switching instructions. The implementation includes specific support for AddressSanitizer (ASan) to ensure memory safety during stack transitions and defines the compile-time representations of runtime VM structures like \VMContRef\ and \VMPayloads\.

_crates/cranelift/src/func\_environ/stack\switching · high confidence

Added internal Wasm memory checker for Wasmtime guests

An internal \wmemcheck\ crate has been added to the Wasmtime project to provide memory checking capabilities for Wasm guests. This new component tracks memory allocations, reads, writes, and frees, detecting issues such as double mallocs, invalid reads/writes to uninitialized memory, invalid frees, and out-of-bounds accesses. It is explicitly marked as an internal-only crate not intended for general use, with APIs that are not strictly reviewed for safety outside of the Wasmtime context.

crates/wmemcheck · high confidence

C API is now built and consumed via CMake

The Wasmtime C and C++ APIs are now built using CMake (minimum version 3.12) instead of the previous build method. Users can now build the C API from source by invoking CMake on the \crates/c-api\ directory, which generates static and shared libraries and installs headers. The C++ API is provided as a header-only library (\wasmtime.hh\) requiring C++17. For Rust projects, the \wasmtime-c-api-impl\ crate can be used to link the C API during compilation.

crates/c-api · high confidence

C and C++ APIs for inspecting WebAssembly component types

New header files have been added to the C API (\wasmtime/component/types/\) and their C++ wrappers to expose detailed type information for WebAssembly components. Users can now inspect component, component instance, module, and function types, including querying their imports and exports. The API also provides access to complex value types such as lists, records, variants, enums, options, results, flags, futures, streams, and maps, along with resource type handling. This enables host applications to introspect the structure and capabilities of loaded components at runtime.

crates/c-api/include/wasmtime/component/types · high confidence

C++ API support for WebAssembly GC reference types

The C++ bindings in \crates/c-api/include/wasmtime\ now include dedicated classes and C API wrappers for WebAssembly Garbage Collection (GC) reference types, gated by the \WASMTIME\_FEATURE\_GC\ configuration. This adds \AnyRef\, \EqRef\, \StructRef\, \ArrayRef\, \ExnRef\, and \ExternRef\ classes, enabling C++ users to create, inspect, and manipulate GC values such as \i31ref\, \structref\, and \arrayref\ directly within the store context.

crates/c-api/include/wasmtime · high confidence

Documentation and build configuration for test-programs crate

The test-programs crate now includes a README.md that documents its structure, test suites (api, cli, http, nn, piped, preview1, preview2), and how to build and execute the Wasm test programs. Additionally, a build.rs script has been added to configure linker arguments for specific test binaries related to imported and shared memory handling.

crates/test-programs · high confidence

Expanded C API type system with GC, exceptions, and memory64 support

The C API in \crates/c-api/src/types\ has been significantly expanded to expose new WebAssembly capabilities. It now includes types for GC references (arrays, structs, and heap types), exception handling (tag and exception types), and advanced memory features (memory64, shared memory, and custom page sizes). The \wasm\_externtype\_t\ enum is extended to include tags, and new C bindings are provided for creating and inspecting these types, allowing host applications to interact with these modern Wasm features.

crates/c-api/src/types · high confidence

Expanded architecture support for fiber stack switching

The fiber implementation in \crates/fiber/src/stackswitch\ now includes native inline-assembly stack-switching routines for ARM, AArch64, LoongArch64, RISC-V 32-bit (riscv32imac), RISC-V 64-bit, s390x, and 32-bit x86, alongside the existing x86\_64 support. These new files provide the low-level register saving, stack pointer swapping, and CFI (Call Frame Information) directives required to run WebAssembly fibers on these additional platforms. Additionally, a \custom\ module was added to allow embedders to supply their own stack-switching implementations for architectures that lack built-in support.

crates/fiber/src/stackswitch · high confidence

Experimental WASI P3 implementation with async component model support

This change introduces a new, experimental WASI P3 implementation under the \p3\ module, enabling the \wasm\_component\_model\_async\ feature for WASI interfaces. It provides auto-generated bindings for the \wasi:cli/command\ world and implements core interfaces including CLI (stdin/stdout/stderr), filesystem, clocks, random, and sockets (TCP/UDP). The implementation supports async operations for socket binding and listening, integrates with the component model linker via \add\_to\_linker\, and uses trappable error types for filesystem and socket errors. This module is marked as unstable and not ready for production use.

crates/wasi/src/p3 · high confidence

Expose component type introspection in the C API

The C API now provides functions to inspect the structure of WebAssembly components, including their imports, exports, and internal type definitions. Users can query component and instance types for their import/export counts and retrieve specific items by name or index. The API also exposes detailed type information for component functions (parameters, results, async status), resources, and value types such as records, maps, and fixed-length lists, enabling C applications to understand and interact with component interfaces at runtime.

crates/c-api/src/component/types · high confidence

Fuzz generator adds passes to prevent floating-point and integer division traps

The fuzz generator in \cranelift/fuzzgen\ now includes two new passes (\fcvt\ and \int\_divz\) that modify generated functions to avoid runtime traps. The \fcvt\ pass detects floating-point-to-integer conversions that could trap on NaN or overflow and replaces the operand with a safe value (1.0) when necessary. The \int\_divz\ pass detects integer division and remainder operations that could trap on division by zero or signed overflow (INT\_MIN / -1) and replaces the denominator with 1 in those cases. These changes allow the fuzzer to exercise more code paths without crashing due to expected arithmetic edge cases.

cranelift/fuzzgen/src/passes · high confidence

ISLE DSL compiler and runtime library introduced

The ISLE (Instruction Selection / Lowering Expressions) domain-specific language compiler and runtime library are now available in the \cranelift/isle/isle\ crate. This statically-typed term-rewriting language allows users to define instruction selection and lowering rules that compile into optimized Rust \match\ expressions. The release includes the full compiler pipeline (lexer, parser, semantic analysis, overlap/recursion checking, and Rust code generation), a new build script that auto-generates test runners from example files, and a comprehensive suite of examples demonstrating features such as multi-extractor/constructor support, \if-let\ patterns, integer literal handling, struct/enum types, and let-variable shadowing.

cranelift/isle/isle · high confidence

Implement WASI Sockets IP name resolution

This change adds the host-side implementation for the \wasi:sockets/ip-name-lookup\ component, enabling applications to resolve domain names to IP addresses. The code introduces the \resolve\_addresses\ function, which maps the WASI sockets interface to the underlying address resolution logic, and supports both standard and named import contexts for flexible integration.

crates/wasi/src/p3/sockets/host · high confidence

Initial C API for WebAssembly Component Model

This release introduces the C API bindings for the WebAssembly Component Model, enabling C and C++ applications to compile, instantiate, and interact with components. The new API exposes functions to configure the engine for component support (including optional map, async, and canonical names features), create and serialize components, and manage component linkers for resolving imports and exports. It also provides utilities for calling component functions (both synchronous and asynchronous), retrieving export indices, and handling component-specific value types such as lists, maps, records, and flags.

crates/c-api/src/component · high confidence

Initial C and C++ APIs for WebAssembly Component Model support

Wasmtime now exposes a new set of C and C++ headers in \crates/c-api/include/wasmtime/component\ to enable embedding and managing WebAssembly components. The C API (\component.h\, \func.h\, \instance.h\, \linker.h\, \val.h\) provides functions to compile, serialize, and deserialize components, instantiate them via a linker, and invoke exported functions. The C++ API (\component.hh\, \func.hh\, \instance.hh\, \linker.hh\, \val.hh\) wraps these capabilities in classes like \Component\, \Instance\, \Linker\, and \Func\, offering a more idiomatic interface for C++ applications. This includes support for defining host functions, handling component resources, and managing nested instances.

crates/c-api/include/wasmtime/component · high confidence

Initial RISC-V 64-bit backend implementation for Cranelift

This change introduces the complete RISC-V 64-bit (riscv64) backend to Cranelift, enabling the compilation of WebAssembly to RISC-V machine code. The implementation covers the full instruction selection, encoding, and emission pipeline, including support for integer, floating-point, and vector (RVV) operations, as well as compressed instructions (C extension). It provides the necessary infrastructure for register allocation, stack frame layout, and exception handling on RISC-V platforms.

cranelift/codegen/src/isa/riscv64/inst · high confidence

Initial WASI P3 sockets host type implementations

This change introduces the host-side type implementations for the WASI P3 sockets interface, specifically adding \mod.rs\, \tcp.rs\, and \udp.rs\ under \crates/wasi/src/p3/sockets/host/types\. These files provide the \Host\ trait implementations for \WasiSocketsCtxView\ and \WasiSocketsNamedView\, including the \HostTcpSocket\ and \HostUdpSocket\ traits. The implementation details cover resource table management, stream/future producers and consumers for TCP (listen, receive, send streams), and direct method bindings for UDP operations (bind, connect, send, receive, address queries). This establishes the foundational host-side wiring for TCP and UDP socket resources in the WASI P3 preview3 sockets specification.

crates/wasi/src/p3/sockets/host/types · high confidence

Initial implementation of WASI P3 filesystem interface

This change introduces the new \wasi:filesystem\ interface (P3) for Wasmtime, providing the host-side implementation and linker registration functions (\add\_to\_linker\, \add\_named\_to\_linker\) required to expose filesystem capabilities to components. The implementation handles resource management for descriptors, supports both blocking and asynchronous file I/O via Tokio tasks, and includes logic to handle timestamp conversions and overflow errors, effectively replacing older WASI filesystem bindings with the new component-model-based API.

crates/wasi/src/p3/filesystem · high confidence

Initial implementation of the Cranelift JIT module

This change introduces the \cranelift-jit\ crate, providing a Just-In-Time compilation backend for Cranelift. It exposes \JITBuilder\ and \JITModule\ to allow users to compile Cranelift IR into executable machine code at runtime. The implementation handles memory allocation for code and data, manages symbol lookups (including external functions and GOT entries), and performs relocations for various architectures (x86\_64, AArch64, RISC-V). It also supports veneers for out-of-range calls and integrates with the Cranelift module system for defining functions and data objects.

cranelift/jit/src · high confidence

Initial release of the cranelift-module crate

The \cranelift-module\ crate is now available, providing a module-level abstraction for Cranelift that allows multiple functions and data objects to be defined, linked, and emitted together. This new component introduces the \Module\ trait as a common interface for different backends, such as JIT execution (via \cranelift-jit\) and native object file generation (via \cranelift-object\). It exposes core types like \DataDescription\ for managing data initialization and relocations, \FuncId\ and \DataId\ for entity tracking, and \Linkage\ for controlling symbol visibility. The crate also includes support for trap site recording and default library call name mappings, serving as the foundational linking layer on top of \cranelift-codegen\.

cranelift/module · high confidence

Initial release of the wasi-nn crate with multi-backend ML inference support

The \wasi-nn\ crate is introduced as a standalone component providing the WASI-NN API for WebAssembly machine learning inference. It ships with a new Apache 2.0 license and includes a build script to manage WITX/WIT file regeneration. The implementation supports multiple backends, including OpenVINO, ONNX Runtime (with optional Nvidia CUDA GPU support), PyTorch, and WinML. To demonstrate these capabilities, the release adds several end-to-end examples: a component-based ONNX classification example, a named-model OpenVINO example, and specific examples for PyTorch and WinML inference.

crates/wasi-nn · high confidence

Initial repository structure and documentation for Wasmtime 50.0.0

This change establishes the foundational repository structure for the Wasmtime project, introducing key configuration and documentation files. It adds a \build.rs\ script that embeds Git commit hashes and version information into the binary, and a \deny.toml\ configuration for managing dependency licenses and version constraints. The repository now includes standard governance and contribution documents such as \CODE\_OF\_CONDUCT.md\, \CONTRIBUTING.md\, \SECURITY.md\, and \AGENTS.md\ (which restricts AI tool usage). Additionally, it defines code ownership via \CODEOWNERS\, sets up Git attributes and ignore rules, and populates \README.md\ and \ADOPTERS.md\ with project details and a list of production adopters like Akamai, Fastly, and Microsoft. The \RELEASES.md\ file is initialized with notes for version 50.0.0, highlighting the new \--listenfd\ CLI option for \wasmtime serve\ and a fix for \ResourceAny\ conversion panics.

(repo-wide) · high confidence

Internal macros for Wasmtime C API reference types

The \wasmtime-c-api-macros\ crate has been added as an internal-only utility to generate convenience macros that mirror the \wasm.h\ header file. These macros facilitate the creation of C API bindings for reference types by automatically generating functions for operations such as deletion, copying, and reference comparison. The generated code includes stub implementations for several reference management functions (such as getting/setting host info and casting references), which currently abort the process if invoked, indicating these features are not yet fully implemented.

crates/c-api-macros · high confidence

Introduce ASLp parser library for ISLE verification

Added the \aslp\ library within the ISLE verifier to parse ASLp (ASL parser) output, providing the AST structures, a Pest-based grammar, and an HTTP client to fetch authoritative ISA semantics from an ASLp server. This enables the verifier to use formal ARM architecture specifications to validate ISLE instruction-selection rules.

cranelift/isle/veri · high confidence

Introduce C API for benchmarking Wasmtime compilation, instantiation, and execution

A new C-compatible benchmarking API is added to Wasmtime, allowing external tools to measure performance across compilation, instantiation, and execution phases. The API exposes a state-machine-driven interface (\wasm\_bench\_create\, \compile\, \instantiate\, \execute\, \free\) and accepts a configuration struct that lets users specify working directories, redirect stdout/stderr/stdin to files, and provide custom callback functions for timing each phase. It supports WASI configuration via flags and includes an optional shuffling allocator to randomize heap object locations, ensuring that performance measurements are not skewed by memory locality artifacts.

crates/bench-api · high confidence

Introduce Cranelift IR interpreter

Adds a new \cranelift-interpreter\ crate that provides an interpreter for executing Cranelift IR. This component implements the core execution engine, including a virtual memory addressing scheme, function call frames, and a step-by-step instruction interpreter that handles arithmetic, control flow, and memory operations, enabling users to interpret and debug Cranelift IR without native code generation.

cranelift/interpreter · high confidence

Introduce Cranelift backend for Pulley bytecode

Adds a new Cranelift backend that compiles WebAssembly functions into Pulley bytecode, enabling execution via the Pulley interpreter. This change introduces the shared backend infrastructure in \cranelift/codegen/src/isa/pulley\_shared\, including the ABI implementation (\abi.rs\) for argument and return value placement, instruction definitions (\inst.isle\) for Pulley's register and memory operations, and the CLIF lowering logic (\lower.isle\, \lower.rs\) that translates intermediate representations into Pulley machine instructions.

_cranelift/codegen/src/isa/pulley\shared · high confidence

Introduce Cranelift backend for Pulley bytecode generation

This change adds the initial Cranelift backend infrastructure for the Pulley interpreter, enabling the compilation of WebAssembly to Pulley bytecode. The implementation in \cranelift/codegen/src/isa/pulley\_shared/inst\ defines the machine instruction types, register classes (integer, float, vector), and binary emission logic required to translate Cranelift IR into the target format. This serves as the foundational codegen layer for executing Pulley, distinct from the interpreter itself.

_cranelift/codegen/src/isa/pulley\shared/inst · high confidence

Introduce Cranelift fuzzgen for randomized instruction generation

Adds the \cranelift-fuzzgen\ crate, which provides a framework for generating randomized Cranelift test cases. The new code includes a configuration module (\config.rs\) to control generation parameters (such as function counts, block sizes, and stack slot alignment), an arbitrary data generation layer (\cranelift\_arbitrary.rs\) for creating random signatures and values, and a function generator (\function\_generator.rs\) that constructs random IR sequences. The library also handles test case formatting (\print.rs\) and target-specific ISA extras (\target\_isa\_extras.rs\), enabling the fuzzer to produce valid, diverse Cranelift functions for testing the compiler and interpreter.

cranelift/fuzzgen/src · high confidence

Introduce FACT fused adapter compiler for component model

This change adds the Flat Adapter Compilation Tool (FACT) infrastructure to Wasmtime, introducing new modules (\core\_types\, \signature\, \trampoline\, \transcode\) that generate optimized, fused WebAssembly adapters for the Component Model. FACT compiles a single WebAssembly function to handle argument translation and validation between component interfaces, supporting both synchronous and asynchronous call patterns (including \async-start\ and \async-return\ helpers) and various data types like strings, lists, and variants. This replaces or augments previous adapter generation methods to improve performance and reduce the overhead of component-to-component and host-to-component interactions.

crates/environ/src/fact · high confidence

Introduce GC compiler interface for WebAssembly reference types

Added a new \gc.rs\ module in \crates/cranelift/src/func\_environ\ that defines the \GcCompiler\ trait, establishing the interface for emitting GC read/write barriers and allocating GC-managed objects (arrays, structs, exceptions). This change provides the foundational infrastructure for supporting WebAssembly reference types and garbage collection within the Cranelift backend, allowing different collector implementations (copying, DRC, null) to be plugged in.

_crates/cranelift/src/func\environ · high confidence

Introduce SMT query caching for the Cranelift verifier

Added a new \cranelift/isle/veri/caching\ crate that provides a transparent caching layer over the \easy\_smt\ solver interface. This allows the Cranelift verifier to persist SMT query responses to disk (as JSON files) and replay them, significantly reducing verification time by avoiding redundant solver invocations. The implementation supports read-write modes for building the cache and read-only-enforcing modes for CI, with cache keys derived from the solver, replay script, and query to ensure correctness.

cranelift/isle/veri/caching · high confidence

Introduce WASI Preview 1 to Preview 2 component adapter and provider crate

This change introduces the \wasi-preview1-component-adapter\, a WebAssembly module that bridges the legacy WASI Preview 1 ABI to the new WASI Preview 2 component model ABI. It provides three build variants—Reactor, Command, and Proxy—allowing existing WASI Preview 1 binaries to be adapted into Preview 2 components. Alongside the adapter implementation, a new \wasi-preview1-component-adapter-provider\ crate is added to embed these adapter binaries as constant byte arrays, enabling Rust consumers to easily perform the adaptation step using tools like \wit\_component::ComponentEncoder\.

crates/wasi-preview1-component-adapter · high confidence

Introduce WASI Sockets API with strict permission controls

The \crates/wasi/src/sockets\ module now provides a new implementation of the WASI Sockets API (supporting both WASIp2 and WASIp3 specifications). This adds capabilities for TCP and UDP socket operations, including DNS name resolution, binding, connecting, and data transmission. By default, TCP and UDP socket creation are disabled; users must explicitly enable these network uses via the \AllowedNetworkUses\ configuration. The implementation also introduces a \SocketAddrCheck\ mechanism that validates socket addresses against a host-provided policy for operations like binding, listening, and connecting, ensuring that network access adheres to configured security constraints.

crates/wasi/src/sockets · high confidence

Introduce Wasmtime Explorer with CLIF and component support

The \wasmtime-explorer\ crate is introduced as an internal tool that generates an interactive HTML visualization of WebAssembly artifacts. This new feature supports both WebAssembly modules and components, and includes a CLIF (Compiler Intermediate Format) view alongside the traditional WebAssembly Text (WAT) and native assembly (ASM) outputs. The tool uses JavaScript to link corresponding instructions across these views, allowing users to hover over or click an instruction in one view to highlight and scroll to the equivalent instruction in the others, with color-coding based on Wasm offsets to aid in debugging and understanding the compilation pipeline.

crates/explorer · high confidence

Introduce Winch JIT compiler crate with Cranelift-backed code generation

The \crates/winch\ crate is added, providing a new Just-In-Time (JIT) compiler for Wasmtime that uses the Cranelift backend for code emission. This new compiler integrates with Wasmtime's environment by implementing the \Compiler\ and \CompilerBuilder\ traits, allowing it to handle function compilation, trampoline generation, and unwind info emission. It enforces specific runtime tunables (such as \winch\_callable\, \table\_lazy\_init\, and \signals\_based\_traps\) and currently does not support incremental compilation, native debug information, or guest-level debugging. The crate also includes an Apache 2.0 license file.

crates/winch · high confidence

Introduce \`clif-util\` CLI with \`bugpoint\`, \`cat\`, \`compile\`, \`disasm\`, \`interpret\`, \`print-cfg\`, and \`run\` subcommands

A new \clif-util\ command-line interface is added to Cranelift, providing a unified entry point for several debugging and utility operations. The \bugpoint\ subcommand reduces Cranelift IR files to minimal reproductions of compilation crashes. The \cat\ subcommand normalizes IR formatting by parsing and re-printing files. The \compile\ subcommand translates IR into native code, with options to print the IR, output object files, and display machine code disassembly. The \disasm\ module supports disassembling compiled binaries, including Pulley-specific output. The \interpret\ subcommand executes annotated IR files using the Cranelift interpreter. The \print-cfg\ subcommand outputs control flow graphs in GraphViz Dot format. The \run\ subcommand compiles and executes IR files in memory, verifying results against test annotations. A \souper-harvest\ subcommand is also available when the feature is enabled, extracting optimization candidates.

cranelift/src · high confidence

Introduce \`wasmtime::component::bindgen!\` macro and \`Lift\`/\`Lower\` derive macros

The \crates/component-macro\ crate now provides the \bindgen!\ procedural macro for generating Rust bindings from WIT (WebAssembly Interface Types) sources, supporting configuration options such as world selection, inline sources, and interface filtering. It also introduces \Lift\, \Lower\, and \ComponentType\ derive macros to handle component model type conversions for records, enums, and variants, along with a \flags!\ macro for defining flags types. This establishes the core macro infrastructure for Wasmtime's component model support.

crates/component-macro/src · high confidence

Introduce \`wasmtime\_test\` macro for configurable test variants

The new \crates/test-macros\ crate provides the \\#\[wasmtime\_test\]\ attribute, allowing tests to automatically run across multiple Wasmtime configuration combinations, including different compiler strategies (CraneliftNative, Winch, CraneliftPulley), garbage collectors (Null, Copying, DeferredReferenceCounting, Auto), and specific WebAssembly features. The macro also includes helper macros \add\_variants\ for generating enum variants and \flags\_test\ for creating component flags, streamlining the creation of comprehensive integration tests.

crates/test-macros · high confidence

Introduce async debugger environment and host integration

The debugger crate now provides a new asynchronous execution model where the debuggee runs as a co-running process, allowing the debugger to observe and control execution via a stream of events. This change introduces a \Debuggee\ type that wraps the Wasmtime store in an async task, enabling users to pause, resume, and query the debuggee's state safely across async boundaries. Additionally, it adds a host implementation (\host.rs\) that registers debugger components and host functions into the Wasmtime linker, facilitating the integration of debugger logic with the runtime environment.

crates/debugger/src · high confidence

Introduce chaos mode control plane for fuzzing

Added the \cranelift/control\ crate, which provides a \ControlPlane\ API to inject pseudo-random perturbations into compiler internals during fuzzing. When the \chaos\ feature is enabled, the control plane consumes fuel and random data to shuffle block lowering orders, insert random instructions, and skip branch optimizations, allowing targeted fuzzing of compiler heuristics. When disabled, the control plane is a zero-sized type optimized away, ensuring no performance impact on release builds, and the crate supports \no\_std\ compilation.

cranelift/control · high confidence

Introduce component-based debugging API with shared memory support

The debugger host now exposes a new \debug-main\ world via WIT bindings, replacing the previous interface with a component-oriented model. This change introduces a \Memory\ abstraction that distinguishes between unshared and shared linear memories, enabling the debugger to inspect and modify shared memory regions (when the \threads\ feature is enabled). The implementation uses type-erased \OpaqueDebugger\ traits to manage debuggee state asynchronously, allowing for proper handling of interrupts and resumption values within the component model's resource lifecycle.

crates/debugger/src/host · high confidence

Introduce configurable JIT memory allocation strategies with mmap and arena allocators

The JIT memory subsystem now supports two distinct allocation backends: a new \ArenaMemoryProvider\ that pre-reserves a contiguous memory region for stable addresses, and a \SystemMemoryProvider\ that allocates memory on-demand using mmap. Both implementations implement the \JITMemoryProvider\ trait and support configurable branch protection (including ARM BTI), allowing users to choose the memory management strategy that best fits their stability and performance requirements.

cranelift/jit/src/memory · high confidence

Introduce cranelift-bitset crate for stack map storage

A new \cranelift-bitset\ crate has been added, providing \ScalarBitSet\ for small sets backed by a single integer and \CompoundBitSet\ for larger sets using heap storage. This library is now used to store stack maps in both Cranelift and Wasmtime, replacing previous implementations.

cranelift/bitset · high confidence

Introduce cranelift-entity crate with array-based entity data structures

The \cranelift-entity\ crate is added, providing array-based data structures that use densely numbered entity references as mapping keys. This includes \PrimaryMap\ for allocating unique entity references, \SecondaryMap\ for associating secondary information with entities, \EntitySet\ for tracking entity membership via bitvectors, \EntityList\ for compact lists of entity references, and \PackedOption\ for memory-efficient optional values. The crate supports \no\_std\ environments, offers fallible allocation methods (e.g., \try\_insert\, \try\_with\_capacity\) that return \OutOfMemory\ errors, and includes optional \serde\ serialization support.

cranelift/entity · high confidence

Introduce cranelift-filetests crate for CLIF test execution

The \cranelift-filetests\ crate is added, providing a comprehensive test runner for Cranelift's CLIF IR. It supports multiple test modes including \run\ (compiling and executing functions via JIT), \interpret\ (running via the interpreter), \compile\ (verifying code generation output), and various analysis passes like \alias-analysis\, \domtree\, and \inline\. The runner executes tests concurrently using a configurable thread pool (controlled by the \CRANELIFT\_FILETESTS\_THREADS\ environment variable) and supports automatic expectation updates via the \CRANELIFT\_TEST\_BLESS\ environment variable.

cranelift/filetests · high confidence

Introduce cranelift-frontend SSA builder and Switch API

The \cranelift-frontend\ crate now provides a frontend API for building Cranelift IR, featuring an SSA builder (\SSABuilder\) that handles mutable variables and incomplete control flow graphs, a \FunctionBuilder\ for constructing functions, and a \Switch\ type for emitting efficient jump tables or binary search trees for sparse case statements.

cranelift/frontend/src · high confidence

Introduce cranelift-object crate for native object file emission

The new \cranelift-object\ crate enables Cranelift to emit native object files (ELF, Mach-O, and COFF) by wrapping the \object\ library. It provides an \ObjectBuilder\ and \ObjectModule\ implementation that translates Cranelift's intermediate representation into compiled object code, supporting per-function and per-data sections, and optionally emitting \.eh\_frame\ unwind information for System V targets to facilitate debugging and stack unwinding.

cranelift/object · high confidence

Introduce cranelift-reader library for parsing .clif test files

The new \cranelift-reader\ crate provides a library for reading and parsing Cranelift Intermediate Representation (CLIF) \.clif\ files. This functionality is primarily needed for testing Cranelift, but is not essential for a JIT compiler. The library includes a lexer and parser that handle test commands, ISA specifications, and function definitions, along with source mapping for error reporting.

cranelift/reader · high confidence

Introduce dedicated source generation infrastructure in cranelift/srcgen

A new \cranelift/srcgen\ crate has been added to centralize and deduplicate source code generation logic previously scattered across the codebase. This library provides a \Formatter\ class for managing indentation and output buffering, along with macros like \fmtln!\ and \loc!\ to simplify generating formatted code with embedded source location comments. It also defines a specific \Error\ type for handling generation failures and supports multiple target languages, including Rust and Isle.

cranelift/srcgen · high confidence

Introduce fallible allocation for bforest Map and Set

The \cranelift\_bforest\ crate now provides \try\_insert\ methods on both \Map\ and \Set\ that return a \Result\ instead of panicking on allocation failure. This allows users to handle out-of-memory conditions gracefully rather than relying on the default panic behavior, which is particularly useful in environments where memory exhaustion needs to be managed explicitly.

cranelift/bforest · high confidence

Introduce fallible allocation types and error-handling utilities in wasmtime-core

The \wasmtime-core\ crate now provides a comprehensive set of allocation types that return \OutOfMemory\ errors instead of panicking, including \TryVec\, \TryString\, \TryCow\, and \TryClone\ for heap-allocated types like \Box\ and \Arc\. These types, along with helper traits like \TryNew\ and \TryCollect\, allow the runtime to handle memory exhaustion gracefully. The crate also consolidates error handling by folding in \wasmtime-error\ and \wasmtime-slab\, providing a unified \Error\ type with context chaining and optional backtrace support, while exposing a \PanicOnOom\ extension trait for cases where panicking is still the desired behavior.

crates/core · high confidence

Introduce internal JIT instruction cache coherence utilities

Added the \wasmtime-jit-icache-coherence\ crate, providing \clear\_cache\ and \pipeline\_flush\_mt\ functions to handle instruction cache maintenance for JIT-generated code. This ensures that newly written executable code is visible to the processor on architectures with non-coherent caches (such as AArch64 and RISC-V) by performing necessary cache invalidations and pipeline flushes, while remaining a no-op on coherent architectures like x86.

crates/jit-icache-coherence · high confidence

Introduce new Cranelift-specific x64 assembler

A new x64 assembler crate (\cranelift-assembler-x64\) is added, shifting the core abstraction from instruction classes to individual instructions. It provides a DSL for defining x64 instructions, generates Rust code for encoding and pretty-printing, and supports CPU feature queries (e.g., SSE, AVX, APX) to validate instruction availability. The crate includes fuzz testing against disassemblers (Capstone, Intel XED) to ensure encoding correctness and is designed to be \no\_std\ compatible.

cranelift/assembler-x64 · high confidence

Introduce new fuzzing targets for async, exceptions, and OOM handling

The fuzzing suite adds dedicated targets to stress new and existing capabilities: \call\_async.rs\ fuzzes async WebAssembly execution strategies, \exception\_ops.rs\ tests exception handling sequences, and \oom.rs\ verifies correct behavior under out-of-memory conditions using a custom allocator. Additionally, \gc\_ops.rs\ targets garbage collection operations, while \component\_api.rs\ now combines static and dynamic component model API testing. The \differential\ target has been expanded to support Winch and Pulley engines, and \misc.rs\ consolidates various smaller fuzzers like memory access and stack checks.

fuzz · high confidence

Introduce serializable CLI configuration crate

The \wasmtime-cli-flags\ crate is added to provide a shared, serializable format for managing Wasmtime configuration options. It introduces a \CommonOptions\ structure that can be parsed from CLI flags via \clap\ or deserialized from formats like TOML, and can also be created from a \wasmtime::Engine\ to serialize significant configuration options. This serves as a unified way for embedders to configure Wasmtime, acting as a bridge between the command-line interface and the core \Config\ type.

crates/cli-flags · high confidence

Introduce standalone wasi-io crate for WASI Preview 2 I/O

The \wasi-io\ crate has been split out from \wasmtime-wasi\ to provide a standalone, \no\_std\-compatible host implementation of the WASI 0.2.12 (Preview 2) \wasi:io\ package. This new crate exposes the \pollable\, \input-stream\, and \output-stream\ Component Model resources via generated bindings and abstract traits (\Pollable\, \InputStream\, \OutputStream\), allowing embedders to implement custom I/O backends. It includes an \add\_to\_linker\_async\ function to register these interfaces in the Wasmtime component linker and enforces a 4096-byte limit on blocking write operations to prevent excessive buffering.

crates/wasi-io · high confidence

Introduce the Pulley portable bytecode interpreter

This release introduces Pulley, a new portable bytecode format and fast interpreter for Wasmtime. The \pulley-interpreter\ crate provides the core virtual machine, including bytecode decoding, encoding, and an interpreter loop that can run via standard Rust loops or experimental tail calls. It also includes a disassembler for inspecting bytecode, a fuzzing harness for roundtrip verification, and a profiling example to analyze execution performance.

pulley · high confidence

Introduce wasi-config crate for WASI Config API support

Wasmtime now includes a dedicated \wasi-config\ crate that implements the \wasi:config\ API (version 0.2.0-rc.1), allowing components to retrieve configuration variables passed from the host runtime. The crate provides \WasiConfigVariables\ to store key-value pairs and exposes \get\ and \get-all\ functions via the Component Model linker, enabling host applications to inject configuration data that components can access at runtime.

crates/wasi-config · high confidence

Introduce wasi-tls crate with WASIp2 and experimental WASIp3 implementations

The new \crates/wasi-tls\ crate provides the host-side implementation for the \wasi:tls\ API, enabling WebAssembly modules to establish secure TLS connections. It includes a stable WASIp2 implementation (\wasi:tls@0.2.0-draft\) and an experimental, unstable WASIp3 implementation (\wasi:tls@0.3.0-draft\). The crate supports pluggable TLS backends via feature flags, defaulting to \rustls\ but also offering \openssl\ and \native-tls\ providers. Users can configure the TLS context and link the \wasi-tls\ world into their Wasmtime applications to perform SSL/TLS handshakes and manage encrypted streams.

crates/wasi-tls · high confidence

Introduce wasmtime-unwinder crate for WebAssembly exception handling

The new \wasmtime-unwinder\ crate provides the core infrastructure for WebAssembly exception handling, including stack walking, exception table management, and handler resumption. It enables Wasmtime to locate and transfer control to exception handlers compiled by Cranelift, supporting architectures such as x86\_64, aarch64, s390x, and riscv64 through architecture-specific assembly implementations.

crates/unwinder · high confidence

Introduction of egraph-based midend optimization pass

Cranelift now includes a new egraph-based midend optimization pass that performs global value numbering, rule-based rewriting, and cost-based extraction to improve generated code quality. This change introduces the core infrastructure for this pass, including a cost model for evaluating instruction efficiency, an elaboration phase that lowers the optimized egraph back to control-flow graph instructions, and the main pass driver that coordinates alias analysis, loop analysis, and dominator tree traversal to enable optimizations like loop-invariant code motion and dead-store elimination.

cranelift/codegen/src/egraph · high confidence

Introduction of the Cranelift function verifier

Adds a new verifier module (\cranelift/codegen/src/verifier\) that ensures generated functions are well-formed. It checks block integrity (terminators, block membership), instruction integrity (format matching, entity existence), SSA form (domination, definition existence), control flow graph consistency (predecessors, dominator tree), type checking (operand/result types, call signatures), and global value constraints. This provides a safety net for the code generation pipeline by catching structural and type errors early.

cranelift/codegen/src/verifier · high confidence

Introduction of the new \`wasmtime-cache\` crate

The caching subsystem has been restructured into a new \crates/cache\ crate, introducing a dedicated \Cache\ struct and \CacheConfig\ for managing compilation artifacts. This change adds a background worker thread to handle cache maintenance tasks asynchronously, including cleanup and optimization. Configuration is now handled via a new \config.rs\ module that supports loading settings from files or creating new ones, with specific defaults for compression levels and cleanup intervals. The cache entry mechanism has been updated to use \postcard\ for serialization instead of \bincode\, and the system now tracks cache hits and misses via atomic counters exposed on the \Cache\ instance.

crates/cache/src · high confidence

Introduction of the wasmtime-jit-debug crate for JIT debugging support

A new \wasmtime-jit-debug\ crate has been added to provide JIT debug interfaces for Wasmtime. This includes a build script that compiles C helpers for GDB JIT debugging and a \gdbjit.c\ source file defining the necessary symbols (such as \\_\_jit\_debug\_register\_code\ and the JIT descriptor) to enable debuggers to inspect JIT-compiled code. The implementation handles platform-specific requirements, exporting symbols on Windows and using weak linkage on other platforms to allow overriding.

crates/jit-debug · high confidence

New AI agent skills for code auditing and test case reduction

Added new agent skills to the \.agents\ directory to support automated code audits and test case minimization. The \cranelift-auditor\ and \wasmtime-auditor\ skills provide structured guidance for LLM agents to identify bugs, miscompilations, and security vulnerabilities in the Cranelift compiler and Wasmtime runtime, including instructions for generating reproducible test cases and organizing audit reports. The \reduce-test-cases\ skill introduces a comprehensive workflow and template scripts for shrinking failing WebAssembly and Cranelift test inputs using tools like \wasm-tools shrink\, \wasm-reduce\, and \creduce\, enabling more efficient bug isolation.

.agents · high confidence

New CI infrastructure for release builds and artifact management

The \ci\ directory now includes a comprehensive set of scripts and configuration files to manage the release process. This includes \build-build-matrix.js\ and \build-test-matrix.js\ to define the build and test matrices for various platforms (Linux, macOS, Windows, Android) and architectures, utilizing updated runner images like \ubuntu-26.04\, \windows-2025\, and \macos-15\. The \build-release-artifacts.sh\ script handles building the CLI and C API, including support for 'min' builds to reduce binary size. \build-tarballs.sh\ and \build-src-tarball.sh\ assemble the final release artifacts, including MSI installers for Windows. Additional scripts like \merge-artifacts.sh\ combine normal and 'min' builds, \vendor-wit.sh\ updates WASI WIT files, and \vendor-c-api-headers.sh\ vendors C API headers. A \RELEASES-template.md\ is also added for release notes.

ci · high confidence

New ISLE verification tooling for AArch64 instruction semantics

A new verification toolchain has been added to the ISLE infrastructure to formally verify AArch64 instruction semantics. This includes the \cranelift/isle/veri/isaspec\ library and binaries, which generate formal specifications from Cranelift's AArch64 instruction definitions and translate them into constraints for an SMT-based verifier. The tooling supports a wide range of instruction categories, including ALU, bit manipulation, load/store, floating-point, and vector operations, ensuring that the generated machine code and assembly output match the formal semantic models.

cranelift/isle/veri/veri · high confidence

New Windows and System V ABI unwind information generators

Cranelift now includes dedicated modules for generating platform-specific unwind information, adding support for Windows x64 and Windows ARM64 ABIs alongside the existing System V (Unix) implementation. This change introduces new files in \cranelift/codegen/src/isa/unwind\ (\winx64.rs\, \winarm64.rs\, \systemv.rs\) that define the specific unwind codes, register mappings, and serialization logic required for each architecture's exception handling and debugging standards. Users benefit from improved stack unwinding reliability on Windows platforms and a more modular, backend-specific unwind infrastructure.

cranelift/codegen/src/isa/unwind · high confidence

New \`wast\` crate for running WAST/WAT test scripts

A new \wast\ crate has been added to provide a dedicated runner for WAST and WAT test scripts. It introduces a \WastContext\ that parses test files and executes directives (such as module instantiation, function calls, and assertions) against the Wasmtime runtime. The implementation supports both core WebAssembly and the Component Model (via the \component-model\ feature), including async execution capabilities. It also includes a \spectest\ module that links the standard WebAssembly spec test primitives (like \print\ and global constants) to allow compatibility with upstream spec test suites.

crates/wast · high confidence

New alias analysis and optimization infrastructure in Cranelift codegen

The Cranelift codegen module introduces a new alias analysis system (alias\_analysis.rs) that performs redundant load elimination, store-to-load forwarding, and dead-store elimination to optimize memory access patterns. It also adds a branch-to-trap analysis (branch\_to\_trap.rs) to rewrite branches to unconditional traps into conditional trap instructions for better optimization. Supporting infrastructure includes a new CFG printer (cfg\_printer.rs) for debugging, a context hash map (ctxhash.rs) for efficient hashing with external context, and updated cursor and data value handling (cursor.rs, data\_value.rs) to support these new optimization passes and improved type handling.

cranelift/codegen/src · high confidence

New benchmark suite for Wasmtime performance

Added a comprehensive set of benchmarks in the \benches\ directory to measure Wasmtime performance across key operations. This includes \call.rs\ for host-to-Wasm and Wasm-to-host call overheads (sync, async, pooling, and typed/untyped variants), \compile.rs\ for module compilation times under different compiler strategies (Cranelift, Winch) and optimization levels, \instantiation.rs\ for eager and lazy instance instantiation with WASI support, \trap.rs\ for trap handling performance under various concurrency and stack depth scenarios, \wasi.rs\ for common WASI API call patterns (file I/O, environment/argument reading), \compile\_time\_builtins.rs\ for comparing host buffer access via traditional APIs versus compile-time builtins, and \thread\_eager\_init.rs\ for thread-local initialization costs. A shell script \wasmtime-serve-rps.sh\ is also added to benchmark the \wasmtime serve\ command's requests per second.

benches · high confidence

New binary emission module with comprehensive relocation support

The \binemit\ module has been introduced to handle the translation of Cranelift's intermediate representation into binary machine code. This change adds a new \Reloc\ enum that defines relocation kinds for multiple architectures, including x86, ARM64, s390x, RISC-V, and Pulley. Notably, it adds support for Thread-Local Storage (TLS) relocations for ELF and Mach-O formats, as well as GOT (Global Offset Table) relocations for PIC (Position Independent Code) on AArch64 and RISC-V. The module also defines \CodeOffset\ and \Addend\ types to ensure platform-independent offset handling and includes a \Display\ implementation for relocation kinds that abstracts away architecture-specific prefixes where appropriate.

cranelift/codegen/src/binemit · high confidence

New compilation metadata sections for debugging and GC

The \wasmtime-environ\ crate now generates dedicated ELF sections for address maps, frame tables, stack maps, and trap information during compilation. These additions enable more precise source-level debugging (including frame state and original Wasm bytecode preservation) and improved garbage collection support by tracking active references in compiled code.

crates/environ/src/compile · high confidence

New coverage and formatting scripts added to the scripts directory

Developers can now generate LLVM source-based coverage reports for cargo test using the new scripts/coverage.rs script, which runs tests with coverage instrumentation, merges .profraw files, and produces an HTML report. Additionally, scripts/format-all.sh was added to format all sources using rustfmt via cargo fmt.

scripts · high confidence

New cranelift-native crate for automatic host CPU feature detection

A new \cranelift-native\ crate has been added to automatically detect the host machine's architecture and CPU capabilities (such as SSE2/AVX512 on x86\_64, NEON/FP16 on AArch64, and RISC-V extensions) at runtime. This allows Cranelift to generate optimized code tailored to the specific hardware it is running on, improving performance without requiring manual configuration.

cranelift/native · high confidence

New differential fuzzing framework and API coverage oracles

The fuzzing infrastructure in \crates/fuzzing/src/oracles\ has been restructured to support differential fuzzing across multiple WebAssembly engines and expanded API coverage. A new \DiffEngine\ trait and \build\ factory in \engine.rs\ allow comparing Wasmtime (including Cranelift, Winch, and Pulley backends) against Wasmi, V8, and the WebAssembly spec interpreter, with specific error-matching logic in \diff\_wasmi.rs\, \diff\_v8.rs\, \diff\_spec.rs\, and \diff\_wasmtime.rs\. Additionally, new oracles have been added to exercise the public API: \api.rs\ executes generated sequences of Wasmtime API calls (stores, modules, instances, globals, tables, memories, functions, tags, GC objects), \component\_api.rs\ fuzzes the Component Model lifting and lowering logic, and \gc\_access.rs\ tests garbage collection object access patterns.

crates/fuzzing/src/oracles · high confidence

New example utilities for adapter generation and OOM-safe map benchmarking

Added two new examples in \crates/environ/examples\: \factc\, a CLI tool that generates WebAssembly adapter modules for component function types (supporting debug output, validation skipping, and text/binary formats), and \btrees\, a benchmark utility that compares the performance of the standard \BTreeMap\ against the new \collections::TryBTreeMap\ (an OOM-handling map implementation) by inserting a configurable number of entries.

crates/environ/examples · high confidence

New examples for Wasm GC, Component Model, and C/C++ API usage

The examples directory now includes comprehensive demonstrations for newly supported WebAssembly features and language bindings. C, C++, and Rust examples for \anyref\ and \externref\ show how to handle Wasm GC reference types in tables, globals, and function calls. A new Component Model example illustrates guest-host interaction using WIT interfaces, while C/C++ examples for \async\ and \externref\ demonstrate asynchronous execution and reference handling via the C API. Additional examples cover epoch-based interruption, core dump capture for debugging, and performance tuning strategies for fast compilation, execution, and instantiation.

examples · high confidence

New fuzzing generators for API calls, exceptions, GC, and codegen settings

The fuzzing harness in \crates/fuzzing/src/generators\ has been expanded with new modules to drive more targeted testing. \api.rs\ introduces a swarm-testing generator for valid sequences of Wasmtime public API calls (stores, modules, instances, globals, tables, memories, functions, tags, and GC types). \exception\_ops.rs\ generates modules specifically exercising WebAssembly exception handling (throw/catch with multiple tags and call depths). \gc\_access.rs\ creates modules to test GC object creation, field/element access, and heap fragmentation scenarios. \codegen\_settings.rs\ allows fuzzing with randomized Cranelift target features (e.g., AVX, SSE, BMI) for both native and cross-compilation targets. Additionally, \async\_config.rs\ handles async store configurations (fuel vs. epoch interruption), \memory.rs\ generates varied memory configurations (including memory64 and custom page sizes), \module.rs\ centralizes wasm-smith configuration with proposal flags, \instance\_allocation\_strategy.rs\ toggles between on-demand and pooling allocators, \pooling\_config.rs\ randomizes pooling limits, and \single\_inst\_module.rs\ generates single-instruction modules for precise instruction-level fuzzing.

crates/fuzzing/src/generators · high confidence

New fuzzing infrastructure crate with structured generators and OOM testing

The \crates/fuzzing\ crate has been introduced to centralize Wasmtime's fuzzing infrastructure. It provides structured test case generators (e.g., \ModuleConfig\, \GcOps\, \AsyncConfig\) that translate raw fuzzer input into valid WebAssembly modules, replacing ad-hoc generation. The crate includes a custom mutator (\wasm\_mutate\) that leverages \wasm-mutate\ and \wasm-smith\ to maintain corpus stability via a 'fuzz input envelope' format. Additionally, it introduces an \OomTest\ allocator for deterministic out-of-memory injection and a suite of oracles for API, differential (Wasmi, V8, Wasmtime), and GC access testing, along with resource limiting via \StoreLimits\ to cap memory usage during fuzzing.

crates/fuzzing/src · high confidence

New internal infrastructure for address mapping, component model adapters, and fallible collections

The \wasmtime-environ\ crate introduces several new internal modules to support advanced compilation and debugging capabilities. A new \address\_map\ module provides data structures for mapping generated machine code addresses back to source locations, enabling precise debugging and backtraces. The \component\ module adds comprehensive support for the WebAssembly Component Model, including type hierarchy, translation logic, and the Fused Adapter Compiler of Trampolines (FACT) which generates core Wasm modules for inter-component communication. Additionally, a new \collections\ module introduces fallible, OOM-handling collection types (such as \TryVec\ and \TryHashMap\) to improve robustness during compilation, while \builtin\ and \bytes\ modules provide helper macros and utilities for managing built-in functions and custom encoding formats.

crates/environ/src · high confidence

New internal macros for versioned symbol export and linking

A new internal crate, \versioned-export-macros\, has been added to support using multiple versions of the same crate that generate assembly. It provides the \versioned\_export\ and \versioned\_link\ proc-macro attributes, which automatically append the current crate's version (sanitized to alphanumeric characters) to function export names and link names, respectively. Additionally, it offers \versioned\_stringify\_ident\ and \versioned\_suffix\ helpers to generate these versioned identifiers within macro code, facilitating safe coexistence of different assembly-generating crate versions.

crates/versioned-export-macros · high confidence

New jit-debug crate for GDB and Perf profiling support

A new \jit-debug\ crate has been added to expose low-level JIT debugging interfaces, enabling better integration with external profiling and debugging tools. It includes \gdb\_jit\_int\ for registering generated code with GDB/Lldb via the standard GDB JIT interface, supporting both \std\ and \no\_std\ environments. Additionally, it provides \perf\_jitdump\ for generating Linux perf jitdump files, allowing developers to profile JIT-compiled WebAssembly code using standard perf tooling.

crates/jit-debug/src · high confidence

New min-platform embedding example with custom allocator and WASI support

The min-platform embedding example has been rewritten to demonstrate a fully custom, \no\_std\ runtime environment. It introduces a custom memory allocator using \dlmalloc\ backed by a static heap, enabling Wasmtime execution without standard library dependencies. The example now supports both standard WebAssembly modules and WASI components via \wasmtime-wasi-io\, featuring a minimal custom async executor and a simplified WASI implementation that logs output. It also showcases advanced loading techniques like \Module::deserialize\_raw\ for custom virtual memory systems.

examples/min-platform/embedding · high confidence

New min-platform example demonstrating custom dynamic library embedding

The min-platform example now provides a concrete implementation for embedding Wasmtime via dynamic libraries on Linux. It demonstrates loading a precompiled embedding library (\libembedding.so\) and a platform-specific symbol provider (\libwasmtime-platform.so\), verifying that the embedding only depends on standard C symbols and \wasmtime\\\ prefixed functions. The example also showcases precompiling modules for an AOT workflow, configuring the engine for cross-compilation targets, and handling error reporting through a shared buffer.

examples/min-platform · high confidence

New publish tooling for Wasmtime and Cranelift release management

A new helper tool has been added to manage the release process for the Wasmtime and Cranelift crate suites. This tool supports version bumping (major, patch, release candidates), verifying crates for publication, publishing to crates.io, and yanking old release candidates. It enforces a topological sort of dependencies and distinguishes between public crates (which cannot have breaking API changes in patch releases) and internal organizational crates.

crates/misc/publish · high confidence

New safepoint and stack map support in the Cranelift frontend

The Cranelift frontend now includes a new \safepoints.rs\ module that implements support for safepoints and stack maps. This addition enables the frontend to track live values across safepoint instructions, which is essential for garbage collection and debugging features that require precise knowledge of variable locations on the stack. The implementation includes liveness analysis and worklist processing to determine which SSA values need to be included in stack maps.

cranelift/frontend/src/frontend · high confidence

New test-program library for WASI component model APIs

The test-programs crate now provides a unified Rust library for exercising WASI component model interfaces. It includes modules for async operations (waitable sets, subtasks, context), HTTP client requests, neural network inference (wasi-nn), socket networking (TCP/UDP), and TLS handshakes, all generated from the latest WIT definitions (WASI 0.2.12 for CLI/HTTP, 0.2.0-rc.1 for config, and draft specs for keyvalue/tls). This replaces the previous preview1-focused test structure with a component-model-native test harness.

crates/test-programs/src · high confidence

New wasmtime-fuzzing crate for centralized fuzzing infrastructure

A new \wasmtime-fuzzing\ crate has been introduced to provide test case generators and oracles for fuzzing, serving as a centralized infrastructure component. This crate is designed to be engine-agnostic (supporting libFuzzer or AFL) and does not contain fuzz targets itself; instead, it provides the glue code and utilities that allow external fuzz targets to plug raw input into generators and run oracles. The build script embeds the contents of the \wast\ test suite directly into the fuzzing binary, ensuring that fuzzing can be run independently of the source tree location.

crates/fuzzing · high confidence

New x64 assembler code-generation infrastructure

The \cranelift-assembler-x64/meta\ crate now provides a domain-specific language (DSL) and code-generation pipeline for x64 instructions. This introduces a structured definition of instruction mnemonics, formats, encodings (including VEX/EVEX), and CPU features, which are used to automatically generate the Rust assembler implementation. This change replaces the previous manual or less-structured approach with a centralized, data-driven generation system, enabling more consistent and maintainable assembly code emission for the x64 target.

cranelift/assembler-x64/meta/src · high confidence

Port wasmtime-fiber to no\_std and support custom fiber stacks

The \wasmtime-fiber\ crate is now available in \no\_std\ environments, enabling fiber support in Wasmtime builds that do not rely on the standard library. This change introduces a new public API for custom fiber stack management, allowing users to supply pre-allocated memory via the \RuntimeFiberStack\ trait and \FiberStack::from\_custom\ method, which is particularly useful for pooling allocators. The implementation is structured with platform-specific backends (Unix, Windows, Miri, and a generic \no\_std\ fallback) and uses inline assembly for stack switching on supported architectures.

crates/fiber/src · high confidence

RISC-V 64-bit backend code generation support added

The Cranelift code generator now includes support for the RISC-V 64-bit architecture. This change introduces the necessary ISLE (Intermediate Semantic Language for Expressions) generated code to handle instruction lowering for RISC-V 64-bit targets, enabling the compiler to produce machine code for this architecture.

cranelift/codegen/src/isa/riscv64/lower/isle · high confidence

Refactor WASI CLI stdio handling with dedicated stream implementations

The WASI CLI module now uses a set of new, dedicated source files (empty.rs, file.rs, locked\_async.rs, mem.rs, stdout.rs, worker\_thread\_stdin.rs) to implement the \StdinStream\ and \StdoutStream\ traits for various underlying I/O types. This change introduces specific implementations for standard streams (stdin/stdout/stderr), file-backed streams, memory pipes, and async wrappers, while also adding a dedicated worker thread for stdin to handle blocking reads safely without stalling the Tokio event loop. Users benefit from more robust and isolated handling of standard I/O operations within the WASI environment, particularly regarding async compatibility and resource management.

crates/wasi/src/cli · high confidence

S390x ISLE lowering code generation enabled

The S390x backend now includes the necessary infrastructure to generate ISLE lowering code. A new \generated\_code.rs\ file has been added to handle the inclusion of the generated ISLE source (\isle\_s390x.rs\) and suppress specific compiler warnings (such as \dead\_code\ and \clone\_on\_copy\) that arise from including generated code, ensuring the S390x backend can utilize the ISLE lowering framework.

cranelift/codegen/src/isa/s390x/lower/isle · high confidence

System V ABI unwind information generation for AArch64

Cranelift now generates DWARF-based System V ABI unwind information for AArch64 targets, enabling accurate stack unwinding and debugging on Linux/Unix-like systems. This change introduces a new module that maps Cranelift registers to their corresponding Gimli DWARF register numbers and constructs Common Information Entries (CIE) and Frame Description Entries (FDE) according to the System V ABI specification. Users benefit from improved debugging support and exception handling reliability on AArch64 platforms that rely on the System V ABI.

cranelift/codegen/src/isa/aarch64/inst/unwind · high confidence

WASI P2 host implementation for clocks, filesystem, sockets, and environment

This change introduces the host-side implementation for the WASI P2 specification within the \crates/wasi/src/p2/host\ directory. It provides the concrete bindings for core subsystems including clocks (wall and monotonic), filesystem operations (both async and sync variants), TCP and UDP sockets, random number generation, and environment/CLI context. The code establishes the \Host\ trait implementations for these modules, handling resource management, error code conversion, and the delegation of operations to the underlying runtime, while also supporting named imports for isolated contexts.

crates/wasi/src/p2/host · high confidence

WASI P3 random interface implementation with named import support

The WASI P3 random module now provides host implementations for generating random bytes and integers, including both secure and insecure variants, as well as an insecure seed source. A key behavioral addition is support for named imports, allowing components to import specific random interfaces by name and receive a unique identifier (NamedId) for each, enabling multiple distinct random contexts within a single component. The module exposes linker functions to register these interfaces for both standard and named import scenarios.

crates/wasi/src/p3/random · high confidence

WASI P3 sockets implementation and address conversion utilities

This change introduces the WASI P3 sockets interface implementation for the \wasi:sockets\ component model. It adds conversion logic (\conv.rs\) to map between standard Rust network types (such as \IpAddr\, \SocketAddr\, and \std::io::Error\) and the WASI P3 socket types, ensuring correct handling of IPv4/IPv6 addresses and error codes. The module also provides linker registration functions (\add\_to\_linker\ and \add\_named\_to\_linker\) to expose these socket capabilities to WebAssembly components, supporting both standard and named imports.

crates/wasi/src/p3/sockets · high confidence

Wasmtime introduces WASI Preview 2 (WASIp2) implementation

Wasmtime now provides a host implementation for the WASI 0.2 specification (WASIp2), enabling WebAssembly components to use the new component model-based interfaces. This location adds the core modules for the Preview 2 API, including auto-generated bindings for the \wasi:cli/command\ world, and concrete implementations for filesystem operations, TCP/UDP networking, IP name lookup, and standard I/O streams. The implementation supports both synchronous and asynchronous execution modes and integrates with the existing Tokio-based runtime.

crates/wasi/src/p2 · high confidence

Winch baseline compiler project documentation and build configuration added

This change introduces the Winch WebAssembly baseline compiler project into the repository. It adds a README describing Winch as a single-pass, non-optimizing compiler designed for Wasmtime, prioritizing compilation performance. It also adds the Apache 2.0 license file for the \winch/codegen\ component and a \build.rs\ script that configures Rust compilation features. The build script automatically enables the appropriate architecture feature (x64 or arm64) based on the target platform if not explicitly specified, and declares several internal features to suppress compiler warnings.

winch · high confidence

Wizer now supports pre-initializing WebAssembly components

Wizer can now instrument, snapshot, and rewrite WebAssembly components (not just core modules). This adds component-aware parsing, instrumentation, and rewriting logic that lifts internal module state (globals, memories) into a WIT-based accessor interface, enabling pre-initialization of component-based Wasm programs.

crates/wizer · high confidence

Architecture

AArch64 backend refactored into modular instruction components

The AArch64 machine instruction implementation has been restructured into distinct modules (\args\, \emit\, \imms\, \regs\, \unwind\) to improve code organization and maintainability. This change separates instruction argument definitions (shifts, extends, addressing modes), binary emission logic, immediate handling, register definitions, and unwind information, while preserving the existing instruction set and behavior for users.

cranelift/codegen/src/isa/aarch64/inst · high confidence

Cranelift IR meta-definition ported to Rust

The shared Cranelift IR definitions (entities, formats, immediates, instructions, settings, and types) have been ported from the previous DSL-based approach to a native Rust implementation in \cranelift/codegen/meta/src/shared\. This change replaces the dynamic lookup and builder patterns with static Rust types and constructors, ensuring that instruction formats, operand kinds, and immediate types are defined directly in code. For users, this provides a more robust and type-safe foundation for the Cranelift codegen meta-layer, potentially improving compile times and reducing runtime overhead in the meta-tooling, while maintaining the same IR instruction set and configuration options.

cranelift/codegen/meta/src/shared · high confidence

Introduce cranelift-codegen-shared crate for shared definitions

A new \cranelift-codegen-shared\ crate has been added to house code and constants common to both \cranelift-codegen\ and \cranelift-codegen-meta\. This includes a \simple\_hash\ function for opcode matching, shared type constants (such as bases for lane, reference, vector, and dynamic vector types), and a \VERSION\ constant. This change centralizes shared logic to keep the meta and codegen crates in sync.

cranelift/codegen/shared · high confidence

Introduction of the new Cranelift machine backend (machinst)

The \machinst\ module introduces a new machine backend infrastructure for Cranelift, replacing the legacy backend. This change adds a shared, generic ABI implementation (\abi.rs\) for architectures like x86-64 and AArch64, a new block ordering system (\blockorder.rs\) that handles critical edge splitting and cold block placement, and a robust code emission buffer (\buffer.rs\) featuring island insertion and veneer generation to handle long-range branch targets. The new pipeline (\compile.rs\) integrates with \regalloc2\ for register allocation and utilizes ISLE (\isle.rs\) for instruction lowering, providing a more modular and maintainable foundation for code generation.

cranelift/codegen/src/machinst · high confidence

Mid-end optimization rules are now defined in modular ISLE files

The Cranelift mid-end optimization rules have been reorganized from a single monolithic file into separate, modular ISLE source files (arithmetic.isle, bitops.isle, cprop.isle, extends.isle, icmp.isle, remat.isle, and selects.isle). This change improves maintainability and clarity of the optimization logic, with a new README.md providing guidance on writing correct and efficient rules. The actual optimization behavior remains the same, as these files are processed by the ISLE compiler to generate the same Rust code.

cranelift/codegen/src/opts · high confidence

RISC-V 64 lowering logic moved to ISLE

The RISC-V 64 instruction lowering implementation has been migrated from hand-written Rust to the ISLE (Intermediate Semantic Language) framework. This change introduces a new \isle.rs\ file that serves as the integration glue, defining the \RV64IsleContext\ and implementing the \generated\_code::Context\ trait to bridge Cranelift's internal representation with the generated ISLE lowering rules. For users, this represents a significant architectural shift in how RISC-V 64 code is generated, centralizing lowering logic in ISLE rules rather than inline Rust functions.

cranelift/codegen/src/isa/riscv64/lower · high confidence

Replaced Python-based CDSL with a Rust-native instruction definition DSL

The Cranelift instruction definition language (CDSL) has been rewritten in Rust, replacing the previous Python-based meta-compiler. This change introduces new Rust modules for defining instruction formats, operands, types, and target settings directly within the \cranelift-codegen-meta\ crate. Users benefit from a more integrated and type-safe instruction definition process, where instruction metadata is now constructed using Rust builders and structs rather than external Python scripts.

cranelift/codegen/meta/src/cdsl · high confidence

Wasmtime engine restructured into \`wasmtime::runtime::vm\` module

The standalone \wasmtime-runtime\ crate has been removed and its contents moved into the \wasmtime\ crate as the \wasmtime::runtime::vm\ module. This change consolidates the engine's core runtime logic into the main library, simplifying the crate structure for embedders while preserving the same underlying functionality.

crates/wasmtime · high confidence

WebAssembly to Cranelift IR translation logic is consolidated into the wasmtime-cranelift crate

The WebAssembly-to-Cranelift translation logic, previously located in the separate \cranelift-wasm\ crate, has been folded into \wasmtime-cranelift\. This change introduces a new \translate\ module containing the core \FuncTranslator\ and \code\_translator\ modules, along with supporting infrastructure for managing heaps, tables, and translation stacks. For users, this consolidates the compilation pipeline, reducing crate boundaries and simplifying the internal architecture of the Wasmtime Cranelift backend.

crates/cranelift/src/translate · high confidence

x64 backend lowering migrated to ISLE

The x64 instruction lowering logic has been moved from the traditional Rust implementation to the ISLE (Intermediate Semantic Language) framework. This change introduces a new \isle.rs\ integration layer that bridges Cranelift's lowering context with generated ISLE code and the new x64 assembler, replacing the previous manual lowering rules. For users, this represents a significant architectural shift in how x64 code is generated, aiming to improve maintainability and correctness of the lowering process through declarative rules.

cranelift/codegen/src/isa/x64/lower · high confidence

Behavioural changes

AArch64 backend rewritten to use ISLE for instruction lowering

The AArch64 code generation backend has been refactored to use the ISLE (Intermediate Semantic Lowering Engine) for instruction selection and lowering. This change replaces the previous Rust-based lowering logic with declarative ISLE rules defined in \inst.isle\, \lower.isle\, and \inst\_neon.isle\, covering ALU operations, loads/stores, SIMD/NEON instructions, and dynamic vector operations. The ABI implementation in \abi.rs\ and the backend entry point in \mod.rs\ have been updated to integrate with this new lowering infrastructure, ensuring that the AArch64 backend now generates machine code through the ISLE framework.

cranelift/codegen/src/isa/aarch64 · high confidence

Automated build and componentization of test programs

The test-programs artifacts are now built via a new Rust build script that compiles Rust and C/C++ test sources targeting \wasm32-wasip1\, automatically generates WebAssembly components using reactor, command, and proxy adapters, and produces generated code with constants and macros for iterating over test kinds (such as cli, p1, p2, p3, nn, config, keyvalue, async, fuzz, wizer, debugger, dwarf).

crates/test-programs/artifacts · high confidence

Cache key generation now depends on git repository presence

The \crates/cache\ crate now includes a build script that detects whether the source is inside a git repository. If git is available, the cache key incorporates the current HEAD commit hash and enables mtime-based invalidation; if not (e.g., in a tarball or non-git checkout), it falls back to the package version and disables mtime checks. This ensures cache validity is tied to actual source changes when possible, while remaining stable in non-git environments.

crates/cache · high confidence

Configure Claude Code with agent guidelines and skills

The .claude directory now includes a CLAUDE.md file that imports guidelines from the root AGENTS.md file, and a skills symlink pointing to the .agents/skills directory. This configures the Claude Code CLI to automatically apply project-specific agent behaviors and access available skills when interacting with the codebase.

.claude · high confidence

Consolidated test utilities for component model and WAST execution

The \crates/test-util\ crate has been consolidated to provide shared infrastructure for running WebAssembly tests. It now includes helpers to configure the Wasmtime engine for component model features (including async, maps, and memory64), a fuzzer for generating arbitrary component model interface types to exercise lifting and lowering logic, and utilities to discover and apply configuration flags from WAST test files. This centralizes test setup logic previously scattered across the repository.

crates/test-util · high confidence

Cranelift backend restructured into fine-grained modules with fine-grained alias analysis

The Cranelift backend in \crates/cranelift/src\ has been reorganized from a monolithic structure into distinct modules (e.g., \alias\_region.rs\, \bounds\_checks.rs\, \builder.rs\, \compiler.rs\, \component\_sync\_call.rs\, \debug.rs\). This change introduces a fine-grained alias analysis system (\AliasRegions\) that tags every memory load and store with specific alias regions (e.g., per-VM context fields, defined memories, GC heap objects), enabling more effective redundant load elimination and dead store removal. It also refactors bounds checking logic into a dedicated module and separates component model synchronization logic (\enter/exit-sync-call\) into its own module, improving code maintainability and optimization opportunities for WebAssembly memory accesses.

crates/cranelift/src · high confidence

Cranelift codegen now includes Apache 2.0 license and generates version strings with git revision

The cranelift/codegen crate now ships with an Apache License 2.0 file, clarifying the licensing terms for users. Additionally, the build script has been updated to append the short git commit hash to the crate's version string (e.g., \0.1.0-abc1234\), allowing users to identify the exact source revision used in their builds. The build process also generates ISLE code and manages ISA feature detection based on the target architecture.

cranelift/codegen · high confidence

Cranelift fuzzing configuration and license updates

Cranelift now automatically enables the gc\_zeal configuration flag when the CARGO\_CFG\_FUZZING environment variable is set, ensuring that garbage collection zeal is active during fuzzing runs. Additionally, the crate now includes an Apache 2.0 LICENSE file and a SECURITY.md file that directs users to the Bytecode Alliance security policy for reporting vulnerabilities.

crates/cranelift · high confidence

Cranelift meta crate restructures ISA definitions into a unified, feature-gated registry

The ISA metadata definitions in \cranelift/codegen/meta/src/isa\ have been reorganized from scattered files into a centralized module structure. A new \mod.rs\ defines a unified \Isa\ enum (X86, Arm64, S390x, Riscv64, Pulley32, Pulley64) with factory functions to instantiate each target's settings. This change consolidates the definition of CPU feature flags (e.g., x86 SIMD extensions, ARM64 pointer authentication, RISC-V vector lengths) and processor presets (e.g., z15/z17, Intel/AMD CPU models) into a single, maintainable registry, enabling cleaner conditional compilation and target selection within the Cranelift codegen meta system.

cranelift/codegen/meta/src/isa · high confidence

Cranelift meta crate rewritten in Rust to generate code and ISLE definitions

The \cranelift/codegen/meta\ crate has been completely rewritten in Rust, replacing the previous Python-based source generation infrastructure. This change introduces new modules for generating CLIF instruction data (\gen\_inst\), ISLE type declarations and compilation units (\gen\_isle\, \isle\), ISA-specific settings (\gen\_settings\), and x64 assembler integration (\gen\_asm\). It also adds support for generating Pulley bytecode instructions (\pulley\) and provides new utility implementations for unique tables (\unique\_table\) and constant hash generation (\constant\_hash\). For users, this represents a significant internal refactoring of the build and code-generation pipeline, improving maintainability and performance without altering the external Cranelift API.

cranelift/codegen/meta/src · high confidence

Cranelift restructured as a Bytecode Alliance project with updated documentation and tooling

Cranelift is now officially a Bytecode Alliance project, reflected in the new README which updates branding, links to the cranelift.dev website, and references to Wasmtime and the JIT Demo. The minimum supported Rust version has been raised to 1.37. Documentation has been reorganized, including the addition of a dedicated guide for using Cranelift as a Rust compiler backend (rustc.md) and the removal of Baldrdash support. A new script (run-souper.sh) has been added to facilitate running Souper on harvested left-hand sides for optimization analysis.

cranelift · high confidence

Enhanced alias analysis with dead-store and idempotent-store elimination

The Cranelift alias analysis now performs dead-store elimination and idempotent-store elimination, allowing it to remove redundant stores and collapse save/clear/restore sequences. This optimization respects alias regions, byte order (endianness), trap codes, and atomic operations, ensuring that stores are only removed when they are truly overwritten or when a subsequent store writes the same value back. The analysis also correctly handles complex control-flow scenarios, including crossing merges, divergent paths, and fence semantics, to maintain correctness while improving generated code efficiency.

cranelift/filetests/filetests/alias · high confidence

Generated ISLE code for x64 lowering is now included via environment variable

The x64 backend's ISLE-generated code is no longer checked into version control; instead, it is regenerated on every compile and included via the \include!\ macro using the \ISLE\_DIR\ environment variable. This change ensures that the generated lowering patterns are always up-to-date with the current ISLE source definitions, removing the need for manual regeneration or commit of the generated file.

cranelift/codegen/src/isa/x64/lower/isle · high confidence

ISLE compiler CLI tool extracted to islec crate

The command-line interface for compiling ISLE (Intermediate Specification Language) DSL files into Rust code has been separated into its own crate (\islec\). This new tool accepts input ISLE source files and an optional output path, generating the corresponding Rust code to either a file or standard output. This change isolates the compilation executable from the core ISLE library logic, simplifying the build structure and allowing the library to be used independently of the CLI tool.

cranelift/isle/islec · high confidence

ISLE pass examples updated to reflect language changes

The ISLE pass examples in \cranelift/isle/isle/isle\_examples/pass\ have been replaced with new files demonstrating current language features. These examples now cover struct types, explicit recursion annotations, let-bindings, external constructors and extractors, type conversions, and SMT-based verification specifications, while removing older patterns like argument polarity and implicit variable matchers.

_cranelift/isle/isle/isle\examples/pass · high confidence

Improved DWARF debug info generation with relocation support and empty section handling

The debug info generation pipeline now properly handles DWARF relocations and ensures that empty DWARF sections are not written to the output. A new garbage collection mechanism conservatively retains DWARF DIEs that have valid code ranges, improving the accuracy of debug information. Additionally, the system now supports generating CFI (Call Frame Information) unwind info alongside DWARF, ensuring better stack unwinding support for debuggers.

crates/cranelift/src/debug · high confidence

Introduce ISLE-based lowering glue code for the Pulley backend

The Pulley backend now uses a new ISLE integration layer (isle.rs) to handle instruction lowering. This change implements the context and specific lowering logic for call instructions (including direct, indirect, host, and return calls), optimizing argument passing for the first four integer arguments in non-PreserveAll ABIs and correctly managing stack argument sizes for tail calls.

_cranelift/codegen/src/isa/pulley\shared/lower · high confidence

Introduce dataflow-based component translation and AOT compilation artifacts

The component compilation pipeline has been restructured to use a dataflow-graph intermediate representation (\ComponentDfg\) for tracking dependencies, fused adapters, and side effects during translation, replacing the previous flat initializer approach. This change enables Ahead-of-Time (AOT) compilation by serializing the resulting component state, type information, and checksums into \ComponentArtifacts\ for storage in ELF files. Additionally, the system now supports semver-aware name lookups for component imports and exports via a new \NameMap\, and introduces static analyses for \vmctx\ sharing and thread transparency to optimize trampoline generation.

crates/environ/src/component · high confidence

Introduce fallible-allocation collection types in wasmtime-environ

The \wasmtime\_environ::collections\ module now provides a suite of collection wrappers (\TryBTreeMap\, \TryEntitySet\, \TryHashMap\, \TryHashSet\, \TryIndexMap\, \TryPrimaryMap\, \TrySecondaryMap\) that enforce fallible allocation. Unlike standard collections that panic on out-of-memory, these types return \Result\<..., OutOfMemory\>\ for operations that may allocate (such as \insert\, \push\, \reserve\, and \with\_capacity\). This change allows the WebAssembly environment layer to handle memory exhaustion gracefully rather than crashing, and includes serialization support for the map and set types.

crates/environ/src/collections · high confidence

Introduce new CLI configuration and command structure

The Wasmtime CLI now uses a new \CodeBuilder\ type to apply compilation options such as unsafe intrinsics and compile-time builtins, and reorganizes command implementations into a modular \commands\ structure gated by Cargo features (e.g., run, serve, explore, wast, cache, compile, cranelift, objdump, hot-blocks, wizer). Common CLI arguments for run commands are consolidated in a new \RunCommon\ struct, exposing options like \--allow-precompiled\, \--profile\, \--dir\, \--env\, and \--gdbstub\, while shared disassembly utilities are added to support \objdump\ and \hot-blocks\.

src · high confidence

Introduction of fused adapter module partitioning and component inlining

The component translation pipeline now includes new modules for identifying and organizing 'fused adapters' (adapt.rs) and flattening component instantiation logic into a global initializer list (inline.rs). This change introduces a partitioning algorithm that groups adapter modules based on their dependencies to avoid circular instantiation issues, and an inlining pass that converts local component initializers into a flat sequence of global initializers with dataflow analysis. This restructuring optimizes how core wasm modules communicate through lifted and lowered functions, reducing runtime complexity and improving the generation of adapter modules for component model interactions.

crates/environ/src/component/translate · high confidence

Migrate x64 instruction definitions to the new assembler DSL

The x64 instruction definitions in \cranelift/assembler-x64/meta/src/instructions\ have been converted to the new assembler domain-specific language. This change introduces structured metadata for a wide range of instructions—including arithmetic, logical, vector (SSE/AVX/AVX512), and control-flow operations—specifying their encodings (REX, VEX, EVEX), required CPU features, and operand formats. This migration enables the assembler to generate more efficient and correct machine code by leveraging the new DSL's capabilities for handling complex instruction shapes and feature flags.

cranelift/assembler-x64/meta/src/instructions · high confidence

New DSL for defining x64 instruction encodings and features

The x64 assembler meta-layer now uses a dedicated Domain Specific Language (DSL) to define instruction formats, CPU feature requirements, and encoding details (REX, VEX, EVEX). This change introduces new modules for customizing instruction display, encoding logic, and operand handling, allowing the assembler to more accurately model complex x64 instruction sets and generate optimized code based on specific CPU features.

cranelift/assembler-x64/meta/src/dsl · high confidence

New x64 assembler code generation infrastructure

The code generation logic for the x64 assembler has been rewritten to produce a new, standalone assembler library. This change introduces generated code for CPU feature detection, instruction encoding (including REX, VEX, and EVEX prefixes), operand formatting, and instruction struct definitions, replacing the previous implementation.

cranelift/assembler-x64/meta/src/generate · high confidence

Platform-specific filesystem implementations for WASI

The WASI filesystem module now includes dedicated platform-specific implementations for Unix and Windows, replacing the previous dependency on the \cap-std\/\cap-primitives\ crate family. This change introduces \unix.rs\ and \windows.rs\ files that handle low-level file operations such as metadata retrieval, file descriptor flag management, and advice hints using native system calls (e.g., \rustix\ on Unix and \windows-sys\ on Windows). Users benefit from reduced external dependencies and potentially more direct control over platform-specific file behaviors, while the core \primitives\ module continues to provide the shared logic for these platform backends.

crates/wasi/src/filesystem · high confidence

Redesigned Wasmtime CLI with new subcommands and consolidated configuration

The Wasmtime command-line interface has been completely redesigned to support the component model and modern WASI standards. The \wasmtime run\ command now handles both core WebAssembly modules and components, using the \--invoke\ flag to target specific functions. A new \wasmtime serve\ command provides a high-performance HTTP server for running WASI HTTP proxy components, featuring instance reuse, graceful shutdown, and configurable concurrency limits. New diagnostic tools include \wasmtime compile\ for ahead-of-time compilation to \.cwasm\, \wasmtime objdump\ for inspecting compiled binaries, \wasmtime explore\ for generating HTML-based compilation visualizations, and \wasmtime hot-blocks\ for Linux-based performance profiling of native code. The \wasmtime wizer\ command integrates pre-initialization capabilities, while \wasmtime wast\ runs WebAssembly test scripts. Configuration is now managed via a new \wasmtime config\ command and a unified \CommonOptions\ structure that consolidates flags for logging, debugging, and WASI features across all subcommands.

src/commands · high confidence

Redesigned function configuration in bindgen!

The \bindgen!\ macro now uses a redesigned configuration system for function flags, allowing users to explicitly control whether imported functions are generated as \async\, \trappable\, or require \Store\ access via a rule-based \FunctionConfig\. This change introduces a new \config.rs\ module that evaluates function rules against WIT interface names to determine the appropriate \FunctionFlags\ (ASYNC, TRAPPABLE, STORE, TRACING, VERBOSE\_TRACING, EXACT), replacing previous ad-hoc or global settings with a more granular, per-function configuration mechanism.

crates/wit-bindgen · high confidence

Refactored GC operations fuzzer into modular components with explicit limits and mutators

The GC operations fuzzing generator has been restructured from a monolithic file into distinct modules (\limits\, \mutator\, \ops\, \types\) to improve maintainability and clarity. This change introduces \GcOpsLimits\ to explicitly constrain generated module parameters (such as the number of parameters, globals, table size, and struct fields) and ensures these values remain within valid ranges during mutation. It also implements specific mutators for managing recursive type groups, including operations to add, remove, swap, move, and duplicate types, as well as dedicated support for struct subtypes and concrete struct fields.

_crates/fuzzing/src/generators/gc\ops · high confidence

Rewritten DWARF debug info transform with address mapping and instance method handling

The DWARF debug information generation in \crates/cranelift/src/debug/transform\ has been completely rewritten to improve accuracy and support for split DWARF. The new implementation introduces an \AddressTransform\ module that explicitly maps generated code addresses back to original WebAssembly bytecode offsets, ensuring that source locations and line numbers in debuggers correspond correctly to the compiled output. It also handles the transformation of instance methods into static methods by stripping \DW\_AT\_object\pointer\ and renaming the \this\ parameter to \\\_this\, which resolves compatibility issues with debuggers that cannot handle non-pointer \this\ types. Additionally, the transform now supports split DWARF (DWARF Fission) by loading and processing \.dwp\ packages, and includes logging capabilities for debugging the transformation process.

crates/cranelift/src/debug/transform · high confidence

S390x backend instruction definitions and emission logic restructured

The s390x backend's instruction handling has been reorganized into dedicated modules for arguments, immediate values, registers, and binary emission. This change introduces a new \MemArg\ enum to encapsulate IBM Z addressing modes (such as base-index-displacement and PC-relative references) and virtual offsets, which are resolved during code emission. It also adds specific types for immediates like \UImm12\, \SImm20\, and shifted immediates, along with helper functions for register management and pretty-printing. The binary emission logic now handles the finalization of these addressing modes, including the generation of helper instructions for large offsets, ensuring correct code generation for the s390x architecture.

cranelift/codegen/src/isa/s390x/inst · high confidence

S390x backend migration to ISLE lowering

The S390x backend has been migrated to use ISLE for instruction selection and lowering, replacing the previous hand-written lowering logic. This change introduces new \inst.isle\ and \lower.isle\ files that define the instruction formats and lowering rules, while \lower.rs\ now delegates to the ISLE-generated code. The ABI implementation (\abi.rs\) remains but is integrated with the new lowering pipeline, ensuring that stack frame layouts, register save areas, and tail-call handling continue to function correctly under the new architecture.

cranelift/codegen/src/isa/s390x · high confidence

Test harness now uses an incremental compilation cache for faster WASI test execution

The test-programs artifacts library now includes a helper function to create a Wasmtime Engine pre-configured with an in-memory incremental compilation cache. This change is designed to improve test runtime performance by sharing compiled module artifacts across multiple test runs that use similar modules, such as WASI preview 1 or sync/async variants.

crates/test-programs/artifacts/src · high confidence

Unified calling convention and ISA module structure in Cranelift

Cranelift now centralizes calling convention definitions and ISA lookup logic in the \cranelift/codegen/src/isa\ module. A new \CallConv\ enum standardizes supported conventions (Fast, Tail, SystemV, WindowsFastcall, AppleAarch64, Winch, PreserveAll, etc.) and exposes methods to query capabilities like tail-call and exception support. The \isa\ module provides a unified \lookup\ API to instantiate \TargetIsa\ implementations for x86\_64, aarch64, riscv64, s390x, and Pulley, while also introducing a shared unwind information abstraction (\UnwindInfo\) that supports SystemV and Windows formats across architectures. This refactoring simplifies ISA selection and calling convention handling for users compiling WebAssembly to native code.

cranelift/codegen/src/isa · high confidence

Updated WASI Preview 3 WIT definitions to version 0.3.0

The vendored WIT (WebAssembly Interface Types) definitions in \crates/wasi/src/p3/wit/deps\ have been updated to WASI specification version 0.3.0. This change refreshes the interface contracts for core subsystems including CLI (environment, arguments, exit, stdin/stdout/stderr streams), clocks (monotonic and system clocks with timezone support), filesystem (types, descriptors, and path resolution), random number generation (secure and insecure sources), and sockets (TCP/UDP networking). These updates ensure the runtime's WASI Preview 3 implementation aligns with the latest standard interface definitions.

crates/wasi/src/p2/wit, crates/wasi/src/p3/wit · high confidence

Vendored WebAssembly C/C++ API headers and updated Wasmtime C API documentation

The \crates/c-api/include\ directory now contains vendored copies of the upstream WebAssembly C API headers (\wasm.h\, \wasm.hh\) and a comprehensive set of Wasmtime-specific headers (\wasmtime.h\, \wasmtime.hh\, \wasi.h\, \doc-wasm.h\). This update brings the C/C++ embedding interface up to date with the latest upstream specification, providing the foundational types and functions for engine, store, and module management, while also exposing the full WASI configuration API (including network, environment, and I/O settings) and the C++ wrapper classes for seamless integration.

crates/c-api/include · high confidence

WASI HTTP implementation restructured with new validation and error handling

The \wasi-http\ crate has been reorganized into a new modular structure, introducing dedicated files for authority parsing, context management, error definitions, and field map handling. This change adds strict validation for outgoing request authorities, ensuring ports are correctly parsed and validated for both IPv4 and IPv6 literals, and rejects malformed values. A new centralized \Error\ enum provides detailed, descriptive error variants for HTTP operations, including connection, TLS, and request-specific errors. The \FieldMap\ type now enforces size limits and forbids specific headers, enhancing security and resource management. Additionally, the \default\_send\_request\ module provides a configurable default implementation for outgoing HTTP requests, supporting timeouts and TLS connections.

crates/wasi-http · high confidence

WASI filesystem primitives reorganized with manual path resolution

The \filesystem::primitives\ module has been restructured to vendor and simplify the underlying \cap-primitives\ logic. This change introduces a new manual, component-at-a-time path resolution engine (in \manually/open.rs\) that enforces sandboxing by explicitly tracking directory handles and limiting symlink expansions, replacing the previous dependency on external crates. It also includes a custom \FileType\ and \Metadata\ implementation to support platform-specific file attributes and timestamps, and adds comprehensive tests for sandboxing, symlink handling, and basic file operations.

crates/wasi/src/filesystem/primitives · high confidence

WASI implementation restructured into modular context and subsystem files

The WASI implementation in \crates/wasi/src\ has been reorganized into distinct modules for CLI (\cli.rs\), clocks (\clocks.rs\), filesystem (\filesystem.rs\), random (\random.rs\), and context management (\ctx.rs\, \error.rs\). This change introduces new context structures like \WasiCliCtx\, \WasiClocksCtx\, and \WasiFilesystemCtx\, along with corresponding builder patterns in \WasiCtxBuilder\ and view traits for linking. The \p1\ and \p0\ modules now rely on these new subsystem contexts, and the \runtime\ module provides a shared Tokio runtime for synchronous embedding support.

crates/wasi/src · high confidence

Wasmtime CLI restructured into a modular subcommand architecture

The Wasmtime command-line interface has been refactored from a monolithic structure into a modular design using the \clap\ library, introducing distinct subcommands for various runtime operations. Users can now interact with specific features via dedicated commands such as \run\ for executing modules, \config\ for cache settings, \compile\ for compilation, \explore\ for debugging, \serve\ for WASI-HTTP proxying, \settings\ for Cranelift configuration, \wast\ for test scripts, \completion\ for shell integration, \objdump\ for inspecting files, \hot-blocks\ for profiling, and \wizer\ for pre-compilation. This change is gated by Cargo features (e.g., \run\, \cache\, \compile\), allowing for a customizable CLI build where only enabled features expose their respective subcommands, while maintaining backward compatibility by defaulting to the \run\ subcommand when no subcommand is provided.

src/bin · high confidence

Wiggle code generator restructured with configurable error and async handling

The \wiggle\ crate has been reorganized into a core library and a separate \wiggle-generate\ codegen crate, introducing a new procedural macro configuration system. Users can now explicitly configure error transformations (defining trappable vs. user errors), control async function generation (including \block\_on\ strategies), toggle tracing instrumentation, and choose between mutable or immutable context references. The generated code now uses \wiggle::error::Result\ and supports custom user error conversion traits, providing finer control over how host-side Rust errors map to WebAssembly ABI errors.

crates/wiggle · high confidence

Winch codegen refactored to share Cranelift integration pieces

The Winch codegen module has been restructured to share more implementation details between the Cranelift and Winch compilers. This change introduces a new default ABI for Winch that pushes system ABI compliance to trampolines, standardizes parameter passing and register usage, and consolidates code generation logic for function calls, bounds checks, and built-in functions. Users benefit from a more maintainable and consistent internal architecture that aligns Winch's code generation closer to Cranelift's design.

winch/codegen · high confidence

s390x backend lowering migrated to ISLE

The s390x backend's instruction lowering logic has been migrated from the previous Rust-based implementation to the ISLE (Intermediate Specification Language for Emitter) framework. This change introduces a new \isle.rs\ module that serves as the integration glue, defining the \lower\ and \lower\_branch\ entry points and implementing the \generated\_code::Context\ trait to handle call argument preparation, stack adjustments for tail calls, and call info generation. This migration aligns the s390x backend with the broader Cranelift effort to standardize lowering logic across all backends using ISLE, potentially improving maintainability and consistency of code generation.

cranelift/codegen/src/isa/aarch64/lower, cranelift/codegen/src/isa/s390x/lower · high confidence

x64 backend instruction representation refactored to use newtype wrappers and external assembler

The x64 instruction representation in \cranelift/codegen/src/isa/x64/inst\ has been restructured to improve type safety and integration with the external \cranelift\_assembler\_x64\ crate. This change introduces newtype wrappers for GPR and XMM registers (e.g., \Gpr\, \Xmm\, \WritableGpr\) to enforce register class invariants at compile time, replacing the previous use of raw \Reg\ types and \u8\ sizes. The instruction emitter (\emit.rs\) and argument definitions (\args.rs\) now leverage these newtypes and the external assembler for encoding, ensuring correct REX prefix construction and operand size handling. Additionally, the \Inst\ enum is now primarily defined via ISLE (\MInst\), with this module acting as the x64-specific backend layer that handles emission, register allocation integration, and pretty-printing using the new type-safe operand structures.

cranelift/codegen/src/isa/x64/inst · high confidence

x64 backend migration to ISLE lowering and new assembler

The x64 backend has been migrated to use the ISLE (Intermediate Semantic Lowering Engine) for instruction selection and lowering, replacing the previous hand-written lowering logic. This change introduces a new x64 assembler module that handles instruction encoding and emission, providing a more modular and maintainable codebase. The migration includes porting all major instruction classes (integer, floating-point, SIMD, control flow) to ISLE rules, enabling better pattern matching and optimization opportunities. Additionally, the ABI implementation has been updated to work with the new infrastructure, including support for the Winch calling convention and improved handling of complex types like i128.

cranelift/codegen/src/isa/x64 · high confidence

Test coverage

AArch64 backend test suite migrated to precise-output format; Add basic JIT module tests; Add component-async-tests harness for WASM Component Model async scenarios; Added C++ API test suite for the C API bindings; Added C++ component model tests; Added Clif filetests for WebAssembly code generation; Added ISLE specification files for verifying Cranelift mid-end optimizations; Added ISLE specification tests for AArch64 ALU and conditional instructions; Added WASI P3 test suite; Added WASI Preview 2 integration tests; Added WASI test harness for preview1, preview2, and preview3; Added WebAssembly test cases for the spec interpreter; Added basic integration tests for cranelift-object module; Added component-async test programs for backpressure, cancellation, and borrowing; Added comprehensive async component model scenario tests; Added control-flow graph tests for loops, early traps, and unreachable blocks; Added domtree filetests using block-based naming; Added filetest coverage for fmsub and fnmsub instructions on x86\_64; Added filetest harness and bugpoint regression tests; Added fuzzer for validating FACT adapter module generation; Added fuzzing target for ISLE compilation; Added integration test for WASI stdin stream behavior; Added system time stub for testing; Added test fixtures for component macro codegen with multiple WIT paths; Added test for cache default config creation; Added test helper macro for codegen test iteration; Added test infrastructure for ISLE printer and execution; Added tests for \bindgen!\ macro code generation and expansion; Added tests for cache configuration validation and parsing; Added tests for cache worker statistics and recompression logic; Added tests for multiversion component macro code generation; Expanded Cranelift runtests for atomic operations and endianness handling; Expanded OOM fuzzing test coverage for Wasmtime; Expanded Pulley32 backend test coverage for control flow, arithmetic, and calling conventions; Expanded component macro test coverage for WIT code generation; Expanded component-async-tests WIT interface definitions; Expanded egraph-based mid-end optimization test coverage; Expanded macro tests for component bindings; Expanded s390x test coverage for arithmetic, atomic, and bitwise operations; Expanded test coverage for Wasmtime components and GC internals; Expanded verifier test coverage for Cranelift IR validation; New CLIF parser test suite for control flow, calls, and stack maps; New filetests validate Cranelift inliner correctness; New x64 filetests for atomic operations, APX, and instruction lowerings; RISC-V 64 backend test suite initialization.

Dependencies

Update dependencies

This release updates 2168 commits across 113 manifests, reflecting a comprehensive upgrade of the project's dependency tree. The changes include version bumps for core components such as Cranelift, regalloc2, wasm-tools, and wasi-common, as well as updates to system-level crates like rustix, cap-std, and object. These updates ensure compatibility with the latest Rust standards and incorporate upstream improvements and fixes from the Bytecode Alliance ecosystem.

(dependencies) · high confidence

Updated WASI WIT dependencies to version 0.2.12

The WebAssembly Interface Types (WIT) definitions in \crates/debugger/wit/deps\ have been updated to WASI specification version 0.2.12. This update refreshes the interface contracts for core subsystems including CLI, clocks, filesystem, I/O, random number generation, and sockets, ensuring the debugger component aligns with the latest standard definitions for these dependencies.

crates/debugger/wit · high confidence

Housekeeping

Added Apache 2.0 license and build configuration for the fiber crate; Generated ISLE code for AArch64 now suppresses compiler warnings.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 41 → 67 (+25.1)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 77 → 80 (+2.5)
  • Architecture 69 (new)
  • Maturity 62 → 73 (+11.1)
  • Readiness 22 → 80 (+58.1)
  • Security 55 → 58 (+3.1)
  • Event Sourcing 100 (new)

Resolved (80)

  • Coverage not measured — test suite did not build
  • Dimension evaluation failed
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High CVE: [GHSA redacted] (crates/explorer/package-lock.json)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 60 more

New (2566)

  • AArch64MachineDeps::compute_arg_locs (cognitive 61) (cranelift/codegen/src/isa/aarch64/abi.rs)
  • AArch64MachineDeps::compute_arg_locs (cyclomatic 33) (cranelift/codegen/src/isa/aarch64/abi.rs)
  • AArch64MachineDeps::gen_clobber_save (cognitive 30) (cranelift/codegen/src/isa/aarch64/abi.rs)
  • AArch64MachineDeps::gen_clobber_save (cyclomatic 18) (cranelift/codegen/src/isa/aarch64/abi.rs)
  • ASIMDMovModImm::maybe_from_u64 (cognitive 23) (cranelift/codegen/src/isa/aarch64/inst/imms.rs)
  • AliasAnalysis::process_inst (cognitive 54) (cranelift/codegen/src/alias_analysis.rs)
  • AliasAnalysis::process_inst (cyclomatic 18) (cranelift/codegen/src/alias_analysis.rs)
  • Base-context workflow trigger runs with an unscoped token
  • BlockLoweringOrder::new (cognitive 27) (cranelift/codegen/src/machinst/blockorder.rs)
  • Boundary-crossing change coupling: compile.rs ↔ compiler.rs (cranelift/src/compile.rs)
  • Boundary-crossing change coupling: wast.rs ↔ lib.rs (crates/test-util/src/wast.rs)
  • CI installs an unverified third-party binary (.github/workflows/main.yml)
  • CI installs an unverified third-party binary (.github/workflows/main.yml)
  • CallInfo::emit_retval_loads (cognitive 17) (cranelift/codegen/src/machinst/abi.rs)
  • CallThreadState::unwind (cognitive 21) (crates/wasmtime/src/runtime/vm/traphandlers.rs)
  • Callee::gen_call_args (cognitive 34) (cranelift/codegen/src/machinst/abi.rs)
  • Callee::gen_call_args (cyclomatic 18) (cranelift/codegen/src/machinst/abi.rs)
  • Callee::gen_call_rets (cognitive 33) (cranelift/codegen/src/machinst/abi.rs)
  • Change coupling clique: memory.rs, table.rs, tag.rs (crates/wasmtime/src/runtime/trampoline/memory.rs)
  • Change coupling: builtin.rs ↔ libcalls.rs (crates/environ/src/builtin.rs)
  • …and 2546 more

Changes since last survey

  • 214 commits — 184 feature/other, 30 fixes

By area

  • crates/wasmtime — 27 commits
  • cranelift/codegen — 26 commits
  • crates/wasi — 19 commits
  • cranelift/filetests — 17 commits
  • tests/disas — 16 commits
  • crates/cranelift — 13 commits
  • crates/environ — 9 commits
  • crates/fuzzing — 9 commits
  • (root) — 8 commits
  • tests/all — 8 commits
  • crates/c-api — 7 commits
  • cranelift/isle — 6 commits
  • crates/wasi-http — 6 commits
  • src/commands — 5 commits
  • crates/test-programs — 4 commits
  • crates/test-util — 3 commits
  • winch/codegen — 3 commits
  • .github/workflows — 2 commits
  • crates/component-macro — 2 commits
  • crates/explorer — 2 commits

Notable commits

  • fix: Cranelift: fix uadd_overflow + load sinking. (#14272)
  • fix: Cranelift: fix multiplicity analysis of multi-def instructions. (#14324)
  • fix: Fix AArch64 subword atomic unsigned min/max (#14029)
  • fix: Fix ResourceAny conversion of synthetic borrowed host resources (#14384)
  • fix: Fix named_imports with a hyphen in interface names (#14105)
  • fix: Fix a bug in elaborartion that led to missed LICM hoisting (#14383)
  • fix: Fix compile on latest Rust nightly (#14193)
  • fix: Fix debug assert in ref.test of any.convert_extern-internalized externrefs (#14315)
  • fix: Fix handling of ifs without elses and subtyping (#14334)
  • fix: Fix handling of context slots in component compositions (#14139)
  • fix: Fix most Cargo warnings on nightly (#14298)
  • fix: Fix native stack-walking on macOS arm64 (#14303)
  • fix: Fix new warnings on Rust nightly (#14125)
  • fix: Fix panic compiling an empty component with debug info (#14130)
  • fix: Fix spurious failure testing cranelift-isle-veri-caching (#14424)
  • fix: Fix stack overflow translating huge variant (#14355)
  • fix: Fix subtle ISLE extractor issue leading to incorrect matching in *mul_overflow lowering. (#14295)
  • fix: Fix writing the json configuration file in fuzzing (#14262)
  • fix: Try to fix a flaky test in CI (#14338)
  • fix: [stack-switching] Fix type index conflation in the translation of switch (#14085)
  • …and 194 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

bytecodealliance/wasmtime was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 27 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 11eac9de8693e1a69f86815d1a58918edd5c1785 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-d00c643c3f66.