Repository navigation
witforge 0.2.0
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 rustnow also emitsconvert.rsfor 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 defaultsoption<T>andlist<T>additions, new-to-old reports a removed required
member asConversionError::MissingMember, added or removed variant and enum cases report
UnknownCase, flags default tofalse, 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 --againstandlock --againstrefuse 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 successfullock(W6-001). witforge schemaemits one Draft 7 JSON Schema document per contract version. Every named
type is underdefinitions; records, flags, variants, results, enums, aliases, and nested
list/option/resultshapes are mapped, with all record fields required and closed enums
(W6-008). The emitter writes JSON directly and adds no runtime dependency.witforge.tomlprojects can supply a WIT root and output paths forrust,proto,schema,
andglue.--configselects the file and--projectselects 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/Defaultderives. 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). rustemits an additive sharedworlds.rswhen a contract has worlds. Each world exposes its
name plus explicit imported and exported interface lists, with oneWORLDSconstant 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.mdand runnableexamples/singleandexamples/evolvedtrees covering
all emitters, configuration, lock continuity, release freezing, and generated conversions
(W7-002).