Gunnar

nordisk/heimdall

guests/verify-bundle/Cargo.toml

[package]
name = "heimdall-guest-verify-bundle"
version = "0.1.0"
edition = "2021"
license = "AGPL-3.0-only"
publish = false

[workspace]

[lib]
crate-type = ["rlib", "cdylib"]

[features]
default = ["openzl"]
# OpenZL-compressed members are decoded: on wasm32 the vendored OpenZL 0.3.0
# DECODER (openzl/, C, compiled by build.rs into the module — a C bug in it is
# a wasm trap, never a host fault); natively openzl-sys-rs, Holger's own.
openzl = ["dep:openzl-sys-rs"]

[dependencies]
# Only for its generated flatbuffers code (`root_as_message`, verified); the
# decoding is src/ipc.rs, because arrow's reader panics on hostile bytes.
arrow-ipc = { version = "59", default-features = false }
x509-parser = { version = "0.18", default-features = false }
ed25519-dalek = { version = "3", default-features = false, features = ["alloc"] }
p256 = { version = "0.14", default-features = false, features = ["ecdsa", "alloc"] }
p384 = { version = "0.14", default-features = false, features = ["ecdsa", "alloc"] }
sha2 = { version = "0.11", default-features = false }
blake3 = { version = "1", default-features = false }
serde = { version = "1", default-features = false, features = ["derive", "alloc"] }
serde_json = { version = "1", default-features = false, features = ["alloc"] }
chrono = { version = "0.4", default-features = false, features = ["alloc", "serde"] }
ron = "0.12"
holger-errcode = "2.0.0"
base64 = { version = "0.22", default-features = false, features = ["alloc"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
openzl-sys-rs = { version = "=0.4.1", optional = true }

[build-dependencies]
cc = "1"

[target.'cfg(target_arch = "wasm32")'.dependencies]
# The same generator and version heimdall-wasm's own test guest uses.
wit-bindgen = "0.57.1"

[profile.release]
# A panic in the guest traps; the host reports it as a refusal (heimdall-wasm-2).
panic = "abort"
opt-level = "s"
lto = true
codegen-units = 1

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
# The REAL producers: Holger's own bundle library (prepare, approve, finalize,
# pack, and its verifier as the differential oracle) and znippy's writer.
holger-update-bundle = "2.0.0"
znippy-common = { version = "0.10.1", features = ["sign"] }
znippy-compress = "0.10.0"
rcgen = "0.14"
chrono = { version = "0.4", features = ["clock"] }
tempfile = "3"
proptest = "1"
p256 = { version = "0.14", features = ["ecdsa", "pkcs8"] }
ed25519-dalek = { version = "3", features = ["pkcs8", "alloc"] }
serde_json = "1"
ron = "0.12"
# The REAL wasm host on main: the guest is built for wasm32, componentized,
# signed, loaded and run exactly as a Heimdall job runs it.
heimdall-wasm = { package = "nordisk-heimdall-wasm", path = "../../crates/heimdall-wasm" }
heimdall-core = { package = "nordisk-heimdall-core", path = "../../crates/heimdall-core" }
guest-host = { version = "0.2.1", default-features = false, features = ["verify-modules"] }
wit-component = "0.258.3"
# Lists the core module's imports (wasm_e2e): nothing but the WIT.
wasmparser = "0.258.3"
# The test-only znippy writer (tests/common/zwriter.rs) writes real Arrow IPC.
arrow-array = "59"
arrow-schema = "59"