Skip to main content

Crate actr_runtime

Crate actr_runtime 

Source
Expand description

§actr-runtime – Business Dispatch Layer

The streamlined actr-runtime contains only pure business dispatch logic, with no dependency on tokio, WebRTC, wasmtime or other platform-specific libraries, and can be compiled for both native and wasm32-unknown-unknown targets.

§Responsibility Separation

actr-hyper   <- Infrastructure layer (transport, wire, signaling, WASM engine ...)
actr-runtime <- Business dispatch layer (ACL + dispatch + lifecycle hooks)  <- you are here
actr-framework <- SDK interface layer (trait definitions: Workload, Context, MessageDispatcher)
actr-protocol  <- Data definition layer (protobuf types)

§Core Types

§Usage Example

use actr_runtime::ActrDispatch;

let dispatch = ActrDispatch::new(Arc::new(workload), acl);

// Lifecycle
dispatch.on_start(&ctx).await?;

// Message dispatch
let response = dispatch.dispatch(&self_id, caller_id.as_ref(), envelope, &ctx).await?;

// Shutdown
dispatch.on_stop(&ctx).await?;

Re-exports§

pub use acl::check_acl_permission;
pub use dispatch::ActrDispatch;

Modules§

acl
ACL (Access Control List) permission checking
dispatch
Business message dispatch layer

Structs§

Acl
Access Control List. Evaluation: any matching DENY overrides all ALLOWs. Default policy: deny if no rule matches.
ActrId
ActrType
RpcEnvelope
RpcEnvelope wraps State Path RPC messages

Enums§

ActrError
Top-level framework error, returned to all callers.

Traits§

Context
Actor execution context interface.
MessageDispatcher
MessageDispatcher - Message dispatcher interface
Workload
Workload — Executable Actor workload

Type Aliases§

ActorResult
Result type for actor RPC calls.