Skip to main content

starlang_runtime/
lib.rs

1//! # starlang-runtime
2//!
3//! Runtime infrastructure for Starlang (Distributed Rust Erlang Abstract Machine).
4//!
5//! This crate provides the core runtime components:
6//!
7//! - [`ProcessRegistry`] - Concurrent registry mapping PIDs to process handles
8//! - [`Mailbox`] - Message queue for process communication
9//! - [`ProcessHandle`] - Handle for interacting with a running process
10//! - [`Context`] - Process execution context with access to runtime services
11
12#![deny(warnings)]
13#![deny(missing_docs)]
14#![allow(dead_code)] // TODO: Remove once all pub APIs are implemented
15
16mod context;
17mod error;
18mod mailbox;
19mod process_handle;
20mod registry;
21mod task_local;
22
23pub use context::Context;
24pub use error::{RuntimeError, SendError, SpawnError};
25pub use mailbox::{Mailbox, MailboxSender};
26pub use process_handle::{ProcessHandle, ProcessState};
27pub use registry::{ProcessRegistry, RemoteSendHook, set_remote_send_hook};
28pub use task_local::{
29    ProcessScope, current_pid, recv, recv_timeout, send, send_raw, try_current_pid, try_recv,
30    with_ctx, with_ctx_async,
31};
32
33// Re-export core types for convenience
34pub use starlang_core::{ExitReason, Pid, Ref, SystemMessage, Term};