Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Stability and Versioning

WeaveFFI will follow Semantic Versioning from 1.0.0. Until then it’s in active pre-1.0 development and any surface may change between minor releases. This page says what the version numbers mean, what 1.0 will promise, and how to keep a downstream project steady today.

Three version numbers

  • The crate version is shared by every published crate (weaveffi, weaveffi-macros, weaveffi-model, weaveffi-cli) and by the CLI. Releases are cut from Conventional Commits by release-plz, which bumps it and tags v{version}.
  • The IDL schema version (0.13.0) is the version: an IDL document declares, and every file it imports declares the same one. Pre-1.0, only the current version is accepted; a document declaring any other is rejected with UnsupportedSchemaVersion. A Rust producer’s embedded metadata records the schema version too, and a library built by another WeaveFFI version is refused when the CLI reads it.
  • The C ABI revision (6) is what {p}_abi_version() returns. It changes only when the runtime surface, the value-buffer encoding, or a calling convention changes incompatibly, independently of the other two. Revision 6 is designed to grow additively: new declarations, new callback methods appended to their interface, and new error codes each get their own contract function, and vtables are open, so adding one never needs a new revision and never breaks a deployed binding.

What 1.0 will cover

After 1.0.0, these surfaces change incompatibly only in a major release:

  • The CLI: subcommands, flags, exit codes, and documented output formats (validate --format json in particular).
  • The IDL schema: accepted keys, type syntax, and the exported JSON Schema.
  • Generated code: exported symbols, signatures, type names, and package layouts. A patch release won’t change generated bytes; a minor release may add symbols but won’t remove or rename any.
  • The C ABI revision and the contract it names.
  • The public Rust API of the published crates (the weaveffi crate’s hidden runtime module, which only macro expansions name, isn’t part of it).

Target tiers

Every target passes the same conformance gate (real consumers against every sample, with every leak counter at zero) before a release ships, but they come in two tiers:

  • Tier 1: C, C++, Swift, Kotlin, Python, Node.js, and .NET. A change to the ABI or the IDL lands in every Tier 1 target at once, and their generated APIs are what 1.0 will freeze first.
  • Tier 2: Go, Ruby, Dart, and WebAssembly. These are fully supported and conformance-tested, but may lag Tier 1 on new ABI work and may change shape more freely before 1.0.

Deprecation will precede removal after 1.0: a deprecated feature warns for at least one minor release (the CLI prints a diagnostic, and generators emit each language’s deprecation marker from the IDL’s deprecated: field) and is removed in the next major release. Post-1.0 schema bumps will ship with a migration tool and accept more than one version.

Determinism

Regenerating with the same WeaveFFI version from the same definition and weaveffi.toml produces byte-identical output on every platform. Generators never iterate hash maps into output, and a test regenerates the fixtures twice and compares. Non-determinism is a bug; please report it with the definition that triggers it.

CI workflow

Pin the CLI version and commit the generated output, generation records ({out}/.weaveffi/) included, so an upgrade is an explicit, reviewable change. Then gate CI on weaveffi generate --check, which renders in memory and compares with the committed directory without writing anything:

- name: Bindings are up to date
  run: |
    cargo install weaveffi-cli --locked --version "=${WEAVEFFI_VERSION}"
    weaveffi validate --warn
    weaveffi generate --check

generate --check lists the files that would change and exits 0 when the output matches and 1 otherwise (generate --diff prints the diff). For a Rust producer, both commands build the crate first (see Library Mode), with the features in [build], so the job needs the Rust toolchain; pass --library <path> to reuse a library an earlier step built.

Documentation versions

The book at https://weaveffi.com/ documents the latest release. Each release’s book also stays published under /v{major}.{minor}/ (for example /v0.26/), and the book for the development head of main is under /dev/. The version a page documents is shown in its header.