Skip to content

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 02 Jul 13:54
· 849 commits to main since this release
fcd6a31

Added

  • WIT round-trip conformance suite (conformance/). A roundtrip:suite
    WIT world that exercises every WIT feature (all primitives, strings, lists,
    tuples, records, options, results, variants, enums, flags, type aliases,
    and resources), with two independently seeded Rust reference components, a
    composition harness, and a Wavelet runner that drives the full check matrix
    against both Rust callees. The Wavelet callee counterpart is checked in as
    the acceptance target for the remaining backend gaps, which are tracked as
    individual follow-up tasks. The two fixes below are the first two items off
    that list.

  • to-char builtin, and char↔codepoint conversion. to-char(n) converts
    an int to the char with that codepoint (erroring on surrogates and values
    past 0x10FFFF; a char passes through unchanged), and the integer
    conversions (to-u8 … to-s64) now accept a char and yield its codepoint —
    so e.g. the next Unicode scalar of 'a' is
    to-char(add(to-u32('a') 1)).

Fixed

  • Chars no longer trap at the compiled component boundary. Compiled code
    lowered a char argument through the int unboxer, which traps on a char box,
    so calling any imported or exported function with a char hit a wasm
    unreachable; and a char lifted in arrived boxed as an int, so it stopped
    behaving as a char in-guest. Chars now lower from and lift to proper char
    values in every placement (arguments, results, list elements, option/result
    payloads), and the ordered comparisons (lt le gt ge) order chars by
    codepoint in compiled code, matching the interpreter.

  • Byte-width payloads no longer corrupt at the component boundary. The wasm
    backend gave every sub-4-byte integer (u8/s8/u16/s16) a 4-byte
    size/alignment and read/wrote it with full i32 accesses, so any such value
    the canonical ABI places in linear memory — list elements, record and tuple
    fields, option/result payloads — was lifted from (and lowered to) the wrong
    strides and offsets: the head of a list<u8> [1 2 3] lifted as 197121,
    some(7) as some(0). Compiled components now use the canonical byte-width
    layout with sign/zero-extending narrow loads, matching the interpreter.

What's Changed

  • docs(dev-notes): consolidate outstanding work into gaps.typ by @logaan in #25
  • conformance: WIT round-trip suite (stage 1 — Rust component + harness) by @logaan in #27
  • conformance: wavelet vs the roundtrip suite (stage 2 — matrix + shortcomings) by @logaan in #31
  • fix(emit): byte-width payloads use their canonical layout in linear memory by @logaan in #29
  • fix(emit)+feat(stdlib): chars at the compiled boundary, and to-char by @logaan in #30
  • release: 0.10.0 by @logaan in #32

Full Changelog: v0.9.2...v0.10.0