Skip to main content

Crate starlang_runtime

Crate starlang_runtime 

Source
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 handles
  • Mailbox - Message queue for process communication
  • ProcessHandle - Handle for interacting with a running process
  • Context - Process execution context with access to runtime services

Structs§

Context
The execution context for a process.
Mailbox
The receiving end of a process mailbox.
MailboxSender
The sending end of a process mailbox.
Pid
A process identifier.
ProcessHandle
A handle to a running process.
ProcessRegistry
A thread-safe registry of all running processes.
ProcessScope
Wrapper that sets up task-local context for a process.
ProcessState
Internal state shared between the process and its handle.
Ref
A unique reference.

Enums§

ExitReason
The reason a process exited.
RuntimeError
Errors that can occur during runtime operations.
SendError
Errors that can occur when sending messages.
SpawnError
Errors that can occur when spawning processes.
SystemMessage
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§

RemoteSendHook
Type alias for the remote send hook function.