Skip to main content
Hexgate has two policy engines that return identical decisions:
  • pydantic — evaluates constraints in-process. Zero setup; what every example uses.
  • WASM — compiles policy.yaml → Rego → WebAssembly. Production-ready, signed, byte-for-byte reproducible.
A bundle is a directory containing policy.yaml + policy.rego + policy.wasm + a manifest with the SHA-256 of each artifact + an optional Ed25519 detached signature over the manifest.

Why a signed artifact

The WASM path exists because it gives you three things the in-process engine can’t:
  • Portability — one compiled .wasm module, evaluated identically anywhere wasmtime runs.
  • Structured deny reasons — exactly which constraints failed, surfaced back to the caller.
  • A trust chain — the signature chains back to the platform’s signing key, the same key that signs your biscuit tokens. Verifying the manifest hashes and the signature proves the whole bundle came from the trusted signer, untampered.

Where to go next