pub struct MapleRuntime { /* private fields */ }Expand description
The MAPLE Resonance Runtime - heart of the entire MAPLE ecosystem
This runtime powers:
- Mapleverse: Coordination of millions of pure AI agents
- Finalverse: Meaningful human-AI coexistence in experiential worlds
- iBank: Accountable autonomous financial operations
Implementations§
Source§impl MapleRuntime
impl MapleRuntime
Sourcepub async fn bootstrap(config: RuntimeConfig) -> Result<Self, BootstrapError>
pub async fn bootstrap(config: RuntimeConfig) -> Result<Self, BootstrapError>
Bootstrap the MAPLE Resonance Runtime
This initializes all subsystems in the correct order to ensure architectural invariants are satisfied from the start.
§Arguments
config- Runtime configuration
§Returns
Ok(MapleRuntime)- Successfully bootstrapped runtimeErr(BootstrapError)- Bootstrap failed
§Example
use maple_runtime::{MapleRuntime, config::RuntimeConfig};
#[tokio::main]
async fn main() {
let config = RuntimeConfig::default();
let runtime = MapleRuntime::bootstrap(config).await.unwrap();
}Sourcepub async fn shutdown(&self) -> Result<(), ShutdownError>
pub async fn shutdown(&self) -> Result<(), ShutdownError>
Shutdown gracefully, preserving all commitments
This ensures that:
- No new commitments are accepted
- Active commitments are completed or recorded
- All Resonator continuity is persisted
- Coupling topology is saved
Sourcepub async fn is_shutting_down(&self) -> bool
pub async fn is_shutting_down(&self) -> bool
Check if runtime is shutting down
Sourcepub async fn register_resonator(
&self,
spec: ResonatorSpec,
) -> Result<ResonatorHandle, RegistrationError>
pub async fn register_resonator( &self, spec: ResonatorSpec, ) -> Result<ResonatorHandle, RegistrationError>
Sourcepub async fn resume_resonator(
&self,
continuity_proof: ContinuityProof,
) -> Result<ResonatorHandle, ResumeError>
pub async fn resume_resonator( &self, continuity_proof: ContinuityProof, ) -> Result<ResonatorHandle, ResumeError>
Resume a Resonator from continuity record
This restores a Resonator’s identity, memory, and pending commitments after a restart or migration.
pub fn presence_fabric(&self) -> &Arc<PresenceFabric>
pub fn coupling_fabric(&self) -> &Arc<CouplingFabric>
pub fn attention_allocator(&self) -> &Arc<AttentionAllocator>
pub fn temporal_coordinator(&self) -> &Arc<TemporalCoordinator>
pub fn scheduler(&self) -> &Arc<ResonanceScheduler>
pub fn telemetry(&self) -> &Arc<RuntimeTelemetry>
Trait Implementations§
Source§impl Clone for MapleRuntime
impl Clone for MapleRuntime
Source§fn clone(&self) -> MapleRuntime
fn clone(&self) -> MapleRuntime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MapleRuntime
impl !RefUnwindSafe for MapleRuntime
impl Send for MapleRuntime
impl Sync for MapleRuntime
impl Unpin for MapleRuntime
impl !UnwindSafe for MapleRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more