facett-build-thing/Cargo.toml
# facett's **build thing** — the recipe, as code.
#
# ## Why facett has one at all, and why it has exactly one row
#
# facett is a library constellation: seventy-odd crates a consumer links, not an
# app with a build matrix. It had no `.nornir/build-variants.toml` and did not need
# one — until row 10 produced something that is not a library and not a binary. The
# pip release (`facet_wrapped_web`: a wheel, an sdist, `SHA256SUMS`, provenance) was
# real and shipped, and reachable ONLY through `cargo xtask publish-pip`, because
# the forge had no `ArtifactKind` for a package to route on. edda 0.1.13 added one.
# This crate is what gives the forge something to route TO.
#
# So the declaration is deliberately NOT a catalogue of facett's crates. Declaring
# seventy `kind = "lib"` rows that nothing builds and nobody reads would be a build
# matrix invented to look complete. It declares the thing that is PRODUCED.
#
# ## Repository tooling, never shipped
#
# `publish = false`, like `xtask`: no facett artifact depends on it.
[package]
name = "facett-build-thing"
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
license = "MIT"
publish = false
description = "facett's build thing: the two PyPI releases — facett (the components wheel) and facett-demo (the Streamlit app wheel + sdist), each with SHA256SUMS + provenance — declared as nornir-build-thing `kind = \"package\"` cells (`facett-wheel`, `facett-demo-wheel`), plus the wasm bundles, the demo and the images. The code is the source; .nornir/build-variants.toml is emitted from it."
[lib]
# Both link targets from ONE source, exactly as korp-build-thing and
# nornir-buildspec-holger: `cdylib` is the wasm32 module the FORGE loads, `rlib` is
# what the tests, the `[[bin]]` and facett's own xtask link. No `cfg` fork in the
# impl, so the module cannot disagree with what the native side compiled in.
#
# Without this the forge falls back to reading the emitted toml and SAYS so —
# measured 2026-09-06, verbatim: "kodvägen VÄGRAD: `facett-build-thing` är ingen
# cdylib — ett wasm32-bygge av en rlib ger ingen .wasm att ladda". Reading the
# description instead of asking the code is exactly what the code-is-source law
# exists to avoid, and it is also what makes the jsguard residual permanent: a
# validation the forge cannot call is a validation the forge does not run.
crate-type = ["cdylib", "rlib"]
[dependencies]
# The declaration types and the `plugin::BuildThing` trait this crate implements.
# A PATH dep into the sibling edda checkout, the way facett resolves every edda
# crate. `0.1.13` is the FLOOR and not a preference: `ArtifactKind::Package`,
# `package::PackageBuild` and recipe schema 3 arrive there, and a reader older than
# it refuses this repo's emitted file outright.
#
# `default-features = false`: a declaration computes nothing and wants none of the
# heavy build machinery (bollard, the plugin host, the packaging container leg).
nornir-build-thing = { version = "0.2.0", path = "../../edda/crates/nornir-build-thing", default-features = false }
# The error type the engine's emitter returns. Named rather than wrapped: the useful
# thing at the `emit` door is the whole `{:#}` chain saying which declaration would
# not read back.
anyhow = "1"
# No `toml` dependency, deliberately. The `code → toml` serializer lives in the
# engine (`nornir_build_thing::emit`, one writer for every repo's recipe crate), so
# this crate neither parses nor serializes the file: it owns a header and three
# calls. A second parser here would be a second opinion about what the file says.
[features]
# `wasm-stage` — the LIVE leg of the `[[build.wasm]]` cells' typed stages
# (`nornir_build_thing::wasm::XtaskWasmStageRunner`: wasm-bindgen at the version
# `Cargo.lock` pins, plus the component-manifest example capture). Forwarded, not
# re-declared, so facett's xtask reaches it THROUGH this crate and names no
# nornir-build-thing of its own — one dependency, one row type (the LAW: "xtask is
# a THIN DOOR onto the build thing"). OFF by default: the forge compiles this crate
# to wasm32 as a sandboxed declaration, and a declaration runs no tools.
wasm-stage = ["nornir-build-thing/wasm-stage"]
# `cargo-container` — the LIVE leg of the cargo kind's container build
# (`nornir_build_thing::cargo_container::{build_variant_in_container,
# DraupnirCargoRunner}`), forwarded for the same reason `wasm-stage` is: xtask
# reaches it THROUGH this crate. The law: "A BUILD THING BUILDS IN A CONTAINER OR A
# KVM, NEVER ON THE HOST" — `cargo xtask build` has no host road. OFF by default;
# it pulls draupnir's backend-oci stack, which the wasm32 declaration must not.
cargo-container = ["nornir-build-thing/cargo-container"]
[dev-dependencies]
# tests/build_gate.rs reads a package manifest's `required-features`.
toml = "1"