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

nordisk/gunnar

crates/gunnar-monetize-guest/Cargo.toml

[package]
name = "gunnar-monetize-guest"
description = "gunnar's own monetize plugin: the gunnar product as a signed WASM guest — the six ops of the product contract (its meters, its estate lifecycle, its estate guardian), pure, with no door, key, socket or clock of its own"
version = "2.0.0"
edition = "2021"
rust-version = "1.85"
license = "AGPL-3.0-only"
publish = false
authors = ["Ignalina ApS", "Vetra Automation AB"]
repository = "https://git.gunnar.rs/nordisk/gunnar"

# **Why it lives in gunnar** (owner 2026-09-25): it is gunnar's OWN plugin in the
# ONE monetize (the ONE box; no monetize runs on an estate's front, owner
# 2026-10-12), and the METERED gunnar medium carries it,
# built and signed from the same commit as the server — so the plugin and the
# server it speaks to can never be two versions. It was `monetize/guests/gunnar`
# in open monetize until then; it moved here with its tests, and it compiles
# from gunnar's OWN `crates/gunnar-proto/proto` instead of a hand-vendored
# mirror. (The linked plugin `monetize/products/gunnar` keeps its own mirror and
# drift guard; that is monetize's business, not this crate's.)
#
# Built for wasm32-unknown-unknown by vetra monetize-impl's Build Thing row
# `gunnar-guest` (`manifest_dir = "../gunnar"`, signed `purpose = "plugin"`);
# `cargo xtask iso-installer` runs that row for a metered gunnar medium and
# embeds the signed module in gunnar-server (`build.rs`, feature `metered`).

# `cdylib` produces the `.wasm` on wasm32-unknown-unknown; `rlib` lets a native
# test drive the same `Guest` through `dispatch`.
[lib]
name = "gunnar_monetize_guest"
crate-type = ["cdylib", "rlib"]

# wasm32-unknown-unknown, not wasip1, for the reason every guest is: this
# module opens no file, owns no socket and reads no clock of its own — each is a
# host door — so a wasip1 build would import `wasi_snapshot_preview1`, which the
# host does not define and refuses by name.
#
# The monetize crates are OPEN monetize, by path from the sibling checkout, as
# gunnar-front takes monetize-server.
[dependencies]
monetize-product-guest = { path = "../../../monetize/crates/monetize-product-guest" }
# The estate lifecycle (ops 90/91, 2026-10-17): the plan is monetize-cloud's own types (no
# provider linked: `default-features = false`, as the cloud guest takes them).
monetize-cloud = { path = "../../../monetize/crates/monetize-cloud", default-features = false }
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1" }

[dev-dependencies]
# `tests/published_embed_agrees_with_the_head.rs` and `tests/the_guest_guards_its_estate.rs`:
# the head monetize-embed (the guest itself no longer checks a ticket: the ONE box does, T13).
monetize-embed = { path = "../../../monetize/crates/monetize-embed" }
# `tests/the_kits_judge_is_the_guardians.rs` (lane G11): the kit's and the console's guard
# (`gunnar_repair::rebuild::judge`) held to the guardians' shared one (monetize-product
# `guardian::rebuild::judge`) rule for rule. Pure, default features.
gunnar-repair = { path = "../gunnar-repair" }
# The guardian and lifecycle tests sign the module they load (monetize runs no unsigned
# guest, 2026-10-17).
guest-host = { path = "../../../edda/crates/guest-host", features = ["verify-modules"] }
# `tests/lifecycle_parity.rs`: the server's own native Gunnar lifecycle, the rules compared.
monetize-server = { path = "../../../monetize/crates/monetize-server", features = ["testing"] }
# The parity claim is asserted against the linked plugin itself rather than
# restated: two opinions about what a namespace HOLDS is the one failure a guest
# migration can have that nobody notices.
monetize-product = { path = "../../../monetize/crates/monetize-product" }
# The open guest host, to load the module this crate really builds. A DEV dependency both ways round — nothing ships either.
monetize-product-wasm = { path = "../../../monetize/crates/monetize-product-wasm" }
# The key type monetize-embed's VerifyingKey is: ed25519-dalek 3 since monetize's
# W3 (2026-10-02), which the linked-plugin parity tests hand over.
ed25519-dalek = { version = "3", features = ["rand_core"] }
# `tests/published_embed_agrees_with_the_head.rs` (audit 2026-10-12, S14): the crates.io
# monetize-embed gunnar-server and gunnar-grpc link (their `version` requirement, the same
# lock entry), beside the head this crate takes by path — every signed form compared byte
# for byte, so a monetize change nobody published fails here and not in the field.
monetize-embed-published = { package = "monetize-embed", version = "0.1.0" }
# `tests/the_build_reference.rs`: the build reference gunnar-server carries.
gunnar-common = { path = "../gunnar-common" }

# ── DETACHED WORKSPACE (owner order 2026-10-22) ──────────────────────────────
#
# gunnar-monetize-guest (gunnar's own signed wasm monetize plugin)
# needs crates that live ONLY in sibling checkouts, and cargo refuses to load a
# workspace any of whose members cannot find a path dependency, optional and
# dev edges included. So this crate is its own workspace and the root one, which
# a LONE clone must load, excludes it. What it inherited from the root is
# spelled out above; the profiles and the in-repo patch below are the root's,
# copied, and `xtask/tests/detached_same_as_root.rs` fails if they drift. The
# estate's sibling patches it takes are in its own `[patch.crates-io]` below (G-B7:
# the root takes none, and no cargo config includes them).
# Build it from the repository root with this repo's target dir, as before:
#   cargo build --manifest-path crates/gunnar-monetize-guest/Cargo.toml --target-dir target …
[workspace]
resolver = "2"

[patch.crates-io]
gix-parallel = { path = "../../vendor/gix-parallel" }
# The estate's sibling patches this workspace's lock takes that the root's old
# `.cargo/siblings.toml` include used to supply (G-B7, 2026-10-26: the root takes
# none now, so every estate workspace names its own; xtask/tests/lone_clone.rs).
nornir-auth-sshsig = { path = "../../../edda/crates/nornir-auth-sshsig" }
nornir-service = { path = "../../../edda/crates/nornir-service" }
monetize-product = { path = "../../../monetize/crates/monetize-product" }
monetize-embed = { path = "../../../monetize/crates/monetize-embed" }
monetize-proto = { path = "../../../monetize/crates/monetize-proto" }

[profile.release]
lto = "thin"
codegen-units = 1
strip = "debuginfo"

[profile.dev-media]
inherits = "release"
lto = false
codegen-units = 16

[profile.test]
debug = "line-tables-only"

[profile.dev.package.ml-kem]
opt-level = 3

[profile.dev.package.x-wing]
opt-level = 3

[profile.dev.package.keccak]
opt-level = 3

[profile.dev.package.sha3]
opt-level = 3

[profile.dev.package.shake]
opt-level = 3

[profile.dev.package.turboshake]
opt-level = 3

[profile.dev.package.x25519-dalek]
opt-level = 3

[profile.dev.package.curve25519-dalek]
opt-level = 3

[profile.dev.package.hpke]
opt-level = 3

[profile.dev.package.chacha20poly1305]
opt-level = 3

[profile.dev.package.cranelift-codegen]
opt-level = 3

[profile.dev.package.cranelift-bforest]
opt-level = 3

[profile.dev.package.cranelift-entity]
opt-level = 3

[profile.dev.package.cranelift-frontend]
opt-level = 3

[profile.dev.package.cranelift-assembler-x64]
opt-level = 3

[profile.dev.package.cranelift-control]
opt-level = 3

[profile.dev.package.cranelift-bitset]
opt-level = 3

[profile.dev.package.regalloc2]
opt-level = 3

[profile.dev.package.wasmparser]
opt-level = 3

[profile.dev.package.wasmtime]
opt-level = 3

[profile.dev.package.wasmtime-environ]
opt-level = 3

[profile.dev.package.wasmtime-internal-cranelift]
opt-level = 3

[profile.dev.package.wasmtime-internal-core]
opt-level = 3