1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # 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
//!
//! ```text
//! 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
//!
//! - [`ActrDispatch`] -- Holds `Arc<Workload>` + optional ACL, provides `dispatch()` entry point
//! - [`check_acl_permission`] -- Pure function for ACL permission evaluation
//!
//! ## Usage Example
//!
//! ```rust,ignore
//! 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?;
//! ```
// -- Core exports --
pub use check_acl_permission;
pub use ActrDispatch;
// -- Re-export actr-framework core traits for convenient downstream imports --
pub use ;
// -- Re-export commonly used actr-protocol types --
pub use ;