[package]
name = "monetize-product-wasm"
description = "The guest host: one ProductFactory per signed .wasm named in `[products.<id>] guest = …`, loaded through edda's guest-host (fuel, deadline, memory ceilings, CMS signature over the blake3 digest), with the host doors a guest may be granted (grpc, http, sign, env). The server cannot tell it from a linked plugin"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
repository = "https://git.gunnar.rs/nordisk/monetize"
license.workspace = true
authors.workspace = true
publish.workspace = true
[dependencies]
monetize-product = { path = "../monetize-product" }
monetize-product-guest = { path = "../monetize-product-guest" }
# The lifted mechanics — the same crate holger's plugin host runs on. Sibling
# path until it is released through `dwarves crate-release`.
guest-host = { path = "../../../edda/crates/guest-host", features = ["wasmtime", "verify-modules"] }
serde.workspace = true
serde_json.workspace = true
# The gRPC door: the host frames HTTP/2 and presents the bearer; the guest
# carries its product's vendored protos and prost-encodes. Raw bytes codec,
# plaintext only — the same posture as the linked holger plugin.
tonic.workspace = true
bytes = "1"
# The HTTP door: rustls, and a host allow-list from the block.
reqwest = { version = "0.13", default-features = false, features = ["rustls-no-provider"] }
# reqwest 0.13 has no bundled roots and its `rustls` feature means aws-lc-rs (C) + the
# OS trust store; ring + the Mozilla bundle keep 0.12 `rustls-tls` behaviour (see the
# `tls_roots` helpers). 2026-10-02.
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
webpki-root-certs = { version = "1" }
# One current-thread runtime per guest, confined here (the gunnar/holger
# plugins' shape), so a caller never needs one.
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "net", "time", "sync"] }
# The request half of a client-streaming call is a channel the host feeds one
# chunk at a time, which is what keeps a whole transaction log out of memory.
tokio-stream = { version = "0.1", features = ["sync"] }
# The HMAC door: a webhook's signature checked on the host against a secret the
# guest never sees. Pure Rust, and both already in this lock.
hmac = "0.13"
sha2 = "0.11"
# The vendor guest kind: the host adapter implements `Payment`.
monetize-pay = { path = "../monetize-pay" }
monetize-pay-guest = { path = "../monetize-pay-guest" }
monetize-signup-guest = { path = "../monetize-signup-guest" }
[dev-dependencies]
# The host's own tests load the toy (a TEST-kind guest) under a `[products]` block: only under
# the test-only flag, never in a build that ships (RA2-12).
monetize-product-guest = { path = "../monetize-product-guest", features = ["test-guests"] }
# tests/common: a hand-written module (WAT) where a test needs a guest no crate builds.
wat = "1"
# tests/the_grpc_door_presents_a_client_identity.rs: a server that REQUIRES a
# client certificate, and the certificates (f-grpc-tls).
rcgen = { version = "0.13", default-features = false, features = ["crypto", "pem", "ring"] }
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring"] }
x509-parser = "0.16"
tempfile = "3"
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }