Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/holger

holger-build-thing/Cargo.toml

# holger's **build thing**, as the forge finds it: a `cdylib` named
# `holger-build-thing` over `holger-recipe`'s declaration.
#
# ## A SHIM — the recipe is `holger-recipe`
#
# dwarves' code road (`dwarves/crates/dwarves/src/build_thing/code.rs`) looks for
# a package named `<repo>-build-thing` and REFUSES it unless `[lib] crate-type`
# contains `cdylib` (a wasm32 build of an rlib emits no `.wasm`). So the name and
# the crate-type are a contract with another repository.
#
# A `cdylib` lib gets no `--extra-filename`, so two units of it overwrite one
# rlib (cargo#6313; measured here 2026-09-16 as an E0460 in build-space's
# doctest — see `holger-recipe/Cargo.toml`). NOTHING may depend on this crate:
# build-space and xtask depend on `holger-recipe`. This crate is the re-export,
# the wasm ABI macro and the `emit` door.
#
# ## Why a new pair rather than turning `build-space` into it
#
# `holger-build-space` is the heavy CONSUMER half — `assemble()`, provenance
# capture, `press_tier`/`build_tier`, the `cargo tree` link audits — with a
# published API that `holger-build` and `xtask` consume. Making it the wasm32
# cdylib would drag that machinery into the plugin sandbox. So the declaration
# lives in the dependency-light recipe, and build-space keeps every
# consumer-facing function, now answering from the recipe's code.
[package]
name = "holger-build-thing"
workspace = "../estate"
version.workspace = true
edition = "2021"
authors = ["Rickard Ernst Björn Lundin <rickard@x14.se>"]
description = "holger's build thing as the dwarves forge loads it: the wasm32 cdylib exporting nornir-build-thing's plugin ABI over holger-recipe's declaration, plus the `emit` door that writes .nornir/build-variants.toml."
license = "AGPL-3.0-only"
repository = "https://git.gunnar.rs/nordisk/holger"

[lib]
name = "holger_build_thing"
# The contract with dwarves (header). `cdylib` is the wasm32 plugin; `rlib` is
# what this crate's own `[[bin]]` links.
crate-type = ["cdylib", "rlib"]

[[bin]]
# `cargo run -p holger-build-thing -- emit` is the documented door that writes
# `.nornir/build-variants.toml`; the emitted file's header names that command.
name = "holger-build-thing"
path = "src/main.rs"

[dependencies]
# The recipe. Everything this crate exports is the recipe's, re-exported.
# `default-features = false` drops the recipe's `gate` feature, which is the
# offline rule engine (`toml` + `std::fs`). This crate compiles to wasm32 and
# must link neither; the rules are a host-side test, not part of the module the
# forge loads.
holger-recipe = { version = "3.0.0", path = "../holger-recipe", default-features = false }
# `export_build_thing!` and the `plugin::BuildThing` trait the macro needs in
# scope — the same entry the recipe uses, so the two cannot resolve to different
# versions of the ABI.
nornir-build-thing = { version = "0.2.6", default-features = false }
anyhow = "1"

[dev-dependencies]
# The plugin proofs moved here from edda with the rules (2026-09-16): they build THIS
# crate for wasm32, load the module through the generic host with no holger source
# beside it, and hold the ABI's answers equal to the native call. `plugin-host` is the
# wasmtime loader, `artifact-section` the object-file reader.
nornir-build-thing = { version = "0.2.6", features = ["plugin-host", "artifact-section"] }
# The shared test kit builds this crate for wasm32 (`test_support::wasm_guest`).
traits = { package = "holger-traits", path = "../traits", features = ["test-support"] }
tempfile = "3"
# Reads the module's import section without running it — the permission-list proof.
wasmparser = "0.262"