Expand description
Runtime-layer derive + attribute macros for ArkheForge.
Three derives — #[derive(ArkheComponent)], #[derive(ArkheAction)],
#[derive(ArkheEvent)] — emit the sealed-trait impl plus the marker-trait
impl pinning TYPE_CODE / SCHEMA_VERSION (and, for ArkheAction,
BAND / IDEMPOTENT).
One attribute — #[arkhe_pure] — asserts that an Action::compute
body conforms to E14.L1 Subset-Rust purity (clock / RNG / I/O / FFI
deny-list). Backed by arkhe-subset-rust-check.
§Compile-time validation
#[arkhe(type_code = N)]mandatory;Nmust lie in the appropriate reserved sub-range (or the shell-scoped extension range).- First named struct field must be
schema_version: u16(wire version tag). #[arkhe(band = K)]mandatory forArkheAction;K ∈ {1, 2, 3}.#[arkhe(idempotent)]opt-in onArkheAction— requires the struct to carry anidempotency_keyfield.- Field-level
#[arkhe(canonical_sort)]onArkheComponent/ArkheEventis allowed only onVec<T>/BTreeSet<T>fields.
§Namespace
Do not confuse with arkhe-macros (L0 kernel derives). This crate
targets the Runtime traits in arkhe_forge_core::{component, action, event, sealed}; the L0 derive crate is orthogonal.
Attribute Macros§
- arkhe_
pure #[arkhe_pure]— attribute macro asserting that anAction::compute- style function body conforms to E14.L1 Subset-Rust purity. Backed byarkhe-subset-rust-check; emits acompile_error!per violation site. Spec anchor: E14.L1 (MC).
Derive Macros§
- Arkhe
Action - Derive
ArkheAction— emits the sealed-trait impl and the marker-trait impl pinningTYPE_CODE,SCHEMA_VERSION,BAND,IDEMPOTENT. - Arkhe
Component - Derive
ArkheComponent— emits the sealed-trait impl and the marker-trait impl pinningTYPE_CODEandSCHEMA_VERSION. - Arkhe
Event - Derive
ArkheEvent— emits the sealed-trait impl and the marker-trait impl pinningTYPE_CODEandSCHEMA_VERSION.