Skip to main content

arkhe_forge_platform/
lib.rs

1//! # ArkheForge Runtime — L2 Services / Platform (`arkhe-forge-platform`)
2//!
3//! L2 services surface — Manifest loader, L2 projection observer, Policy,
4//! Rate limit, Audit receipt issuance, Cascade scheduler, Idempotency dedup,
5//! GDPR erasure-cascade service, DR coordinator. Depends on L0
6//! `arkhe-kernel` plus L1 `arkhe-forge-core` only — no upward edge
7//! into shell crates (layer-independence directive).
8//!
9//! # Feature flags
10//!
11//! | Flag                       | Pulls in | Role |
12//! | :------------------------- | :------- | :--- |
13//! | *(none — default)*         | —        | Tier-0 dev: `MockKmsBackend` + in-memory crypto-erasure. |
14//! | `tier-1-kms`               | `argon2`, `chacha20poly1305` | Tier-1 KMS free-tier — `XChaCha20-Poly1305` AEAD. |
15//! | `tier-2-multi-kms`         | `tier-1-kms` + `aes-gcm` + `aes-gcm-siv` | Tier-2 production AEAD surface (implies `tier-1-kms`). |
16//! | `tier-2-aws-kms`           | `aws-sdk-kms`, `aws-config`, `tokio` | Orthogonal AWS KMS backend opt-in — `AwsKmsBackend` impl of [`hf2_kms::KmsBackend`]. |
17//!
18//! The L0 kernel WAL chain signing inherits Hybrid Ed25519 + ML-DSA 65
19//! transitively via `arkhe-kernel`. Forge L2 attestation surfaces emit
20//! Ed25519.
21//!
22//! Cloud KMS backends are orthogonal to the AEAD tiering — a deployment can
23//! run `tier-1-kms` AEAD with `tier-2-aws-kms` key storage, or any other
24//! mix. GCP / Azure backends land as their own `tier-2-<vendor>-kms` flags
25//! in future releases.
26
27// `unsafe_code` is `deny` (not `forbid`) because `process_protection` must call
28// platform FFI (mlockall / prctl / setrlimit / ptrace / VirtualLock / ...) —
29// every other module keeps the safe-only invariant through the crate-wide deny
30// plus the `#[deny(unsafe_code)]` attribute inherited below. The per-target
31// FFI files opt in with a scoped `#![allow(unsafe_code)]` and document each
32// `unsafe` block with SAFETY notes.
33#![deny(unsafe_code)]
34#![warn(missing_docs)]
35
36pub mod crypto;
37pub mod crypto_erasure;
38pub mod dedup;
39pub mod dispatcher;
40pub mod hf2_kms;
41pub mod manifest;
42pub mod process_protection;
43pub mod projection;
44pub mod verifier;
45pub mod wal_export;
46
47/// ArkheForge Runtime Platform semver — matches the repo release.
48pub const PLATFORM_SEMVER: (u16, u16, u16) = (0, 14, 0);