Skip to content

witforge 0.2.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 23:51
· 357 commits to main since this release

0.2.0 is the first pre-1.0 release of the full compiler surface. It adds generated
version conversions, declaration-order fingerprints, JSON Schema, world metadata,
witforge.toml projects, and the CI plan gate. Generated output changes for contracts with
multiple versions or worlds, and the schema generator adds a new output; consumers should
regenerate and commit their generated trees when moving from 0.1.2.

Added

  • witforge rust now also emits convert.rs for a WIT root with two or more versions. It has
    one module per adjacent version pair in each direction, with fallible type conversions:
    old-to-new defaults option<T> and list<T> additions, new-to-old reports a removed required
    member as ConversionError::MissingMember, added or removed variant and enum cases report
    UnknownCase, flags default to false, aliases and named structural types convert
    recursively, and retyped or kind-changed types are refused as contract errors. A required,
    non-defaultable addition is refused so every accepted version pair has a generated adapter
    (W6-007).
  • The lockfile gains an additive declaration-order section with per-parent FNV-1a 64
    fingerprints. check --against and lock --against refuse a reorder of members common to
    two versions, while additions and removals are ignored; a v2 lockfile without the section is
    accepted and migrates on the next successful lock (W6-001).
  • witforge schema emits one Draft 7 JSON Schema document per contract version. Every named
    type is under definitions; records, flags, variants, results, enums, aliases, and nested
    list/option/result shapes are mapped, with all record fields required and closed enums
    (W6-008). The emitter writes JSON directly and adds no runtime dependency.
  • witforge.toml projects can supply a WIT root and output paths for rust, proto, schema,
    and glue. --config selects the file and --project selects a project when there is more
    than one; CLI flags override every configured path, paths are relative to the configuration
    file, and unknown keys are errors. The existing command-line-only form remains valid
    (W6-005).
  • Measured owned versus borrowed Rust parameters on generated alint types. Concrete clones cost
    0.58–0.69 ms for 1,000 analyzer rows and 7.1–9.0 ms for 10,000 rows, but borrowing would require
    a lifetime-bearing generated surface and does not remove native-to-WIT mapping. Owned parameters
    remain the 0.x/1.0 policy; borrowed inputs require a measured consumer path and a new contract
    version (W6-002).
  • Evaluated conditional Eq/Hash/Default derives. They are declined for 0.x/1.0 because
    derives would change frozen generated APIs, floats block Eq/Hash transitively, and WIT has no
    natural Default for enums, variants, or results; a consumer request plus a new contract version
    would trigger an implementation task (W6-003).
  • rust emits an additive shared worlds.rs when a contract has worlds. Each world exposes its
    name plus explicit imported and exported interface lists, with one WORLDS constant per
    version; per-version Rust modules remain frozen (W6-004).
  • Published the 1.0 public API policy, conformance matrix, and release criteria/deprecation
    runways. The conformance suite exercises every supported WIT shape and all four emitters on
    the comprehensive model fixture (W6-009).
  • Evaluated docs-only patch versions and a memberless-definition inventory. Both are declined for
    0.x/1.0: draft docs changes are accepted without wire changes, memberless additions have no
    wire entry, and released docs are caught by the release freeze (W6-006).
  • Added docs/quickstart.md and runnable examples/single and examples/evolved trees covering
    all emitters, configuration, lock continuity, release freezing, and generated conversions
    (W7-002).