Rust Guide
Rust is the Forge reference implementation. Read this tab when you want the earliest runtime behavior, the clearest conformance signal, and the most direct path to WASM, identity, auth, tools, providers, and release-gate internals.
Language perspective
Rust users should think of Forge as a crate family first and a convenience SDK second. The important boundary is not one package name; it is the ANVIL contract implemented across crates with tests that other SDKs follow.
Primary surfaces:
forge-rs/crates/forge-coreforge-rs/crates/forge-agentforge-rs/crates/forge-identityforge-rs/crates/forge-authforge-rs/crates/forge-mcpforge-rs/conformance
Follow this path
- Start with Quickstart to run an identity-bound agent.
- Read Agents and Generation together.
- Add Tools and Capabilities.
- Read WASM and WASI before deploying portable modules.
- Use Conformance Suite before treating behavior as stable.
cargo test --workspace
python3 tools/release_gate.py --root .
Contract focus
| Contract | Rust reading lens |
|---|---|
| Identity | Treat forge-identity as the source of truth for key derivation, OAS documents, glyphs, and lineage proofs. |
| Capability | Treat forge-auth and ACT verification as runtime hot-path security code. |
| Tools | Keep Tier 2 tools behind explicit scopes and approval policy. |
| Telemetry | Verify span names and audit entry structure against conformance fixtures. |
| WASM | Assume Rust changes first when deterministic crypto or host-boundary behavior changes. |
What to read next
The ANVIL contract →
The behavioral contract Rust anchors for every SDK.
WASM and WASI →
How Rust becomes the portable module shared by the other languages.
Provider contract →
How direct and gateway providers satisfy the same runtime surface.
Release gate →
The final source of truth for production readiness.
Current guidance
Use Rust when you need reference behavior, conformance work, low-level runtime debugging, or production deployment confidence. Do not infer readiness from crate presence alone; use the release gate.