Expand description
§starlang-runtime
Runtime infrastructure for Starlang (Distributed Rust Erlang Abstract Machine).
This crate provides the core runtime components:
ProcessRegistry- Concurrent registry mapping PIDs to process handlesMailbox- Message queue for process communicationProcessHandle- Handle for interacting with a running processContext- Process execution context with access to runtime services
Structs§
- Context
- The execution context for a process.
- Mailbox
- The receiving end of a process mailbox.
- Mailbox
Sender - The sending end of a process mailbox.
- Pid
- A process identifier.
- Process
Handle - A handle to a running process.
- Process
Registry - A thread-safe registry of all running processes.
- Process
Scope - Wrapper that sets up task-local context for a process.
- Process
State - Internal state shared between the process and its handle.
- Ref
- A unique reference.
Enums§
- Exit
Reason - The reason a process exited.
- Runtime
Error - Errors that can occur during runtime operations.
- Send
Error - Errors that can occur when sending messages.
- Spawn
Error - Errors that can occur when spawning processes.
- System
Message - System-level messages delivered to processes.
Traits§
- Term
- A trait for Erlang-like terms that can be serialized and sent between processes.
Functions§
- current_
pid - Gets the current process’s PID from task-local context.
- recv
- Receives the next message from the current process’s mailbox.
- recv_
timeout - Receives the next message with a timeout.
- send
- Sends a typed message to another process.
- send_
raw - Sends a raw message to another process.
- set_
remote_ send_ hook - Set the remote send hook.
- try_
current_ pid - Gets the current process’s PID, returning None if not in a process context.
- try_
recv - Tries to receive a message without blocking.
- with_
ctx - Executes a function with mutable access to the current context.
- with_
ctx_ async - Executes an async function with mutable access to the current context.
Type Aliases§
- Remote
Send Hook - Type alias for the remote send hook function.