2026-11-02 09:08:49 +00:00
|
|
|
//! Small stable identity types shared across workspace layers.
|
|
|
|
|
|
|
|
|
|
use std::fmt;
|
|
|
|
|
|
2026-11-03 17:26:21 +00:00
|
|
|
mod log;
|
feat!: add structured actor state and messages
Introduce owned portable values with distinct actor references, bounded Rune conversion, JSON REPL literals, and nested reference completion. Preserve isolation and atomic transitions across state, messages, effects, migration, inspection, and TCP clients.
BREAKING CHANGE: protocol v3 replaces integer state and kind/value/target_ref messages with tagged values. Rune handlers now take (state, message) and return (new_state, [(actor_reference, message)]). The REPL send command accepts one JSON message.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 15:56:03 +00:00
|
|
|
mod value;
|
2026-11-03 17:26:21 +00:00
|
|
|
pub use log::{LogEntry, LogLevel};
|
feat!: add structured actor state and messages
Introduce owned portable values with distinct actor references, bounded Rune conversion, JSON REPL literals, and nested reference completion. Preserve isolation and atomic transitions across state, messages, effects, migration, inspection, and TCP clients.
BREAKING CHANGE: protocol v3 replaces integer state and kind/value/target_ref messages with tagged values. Rune handlers now take (state, message) and return (new_state, [(actor_reference, message)]). The REPL send command accepts one JSON message.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 15:56:03 +00:00
|
|
|
pub use value::{ActorRef, MAX_VALUE_BYTES, MAX_VALUE_DEPTH, MAX_VALUE_NODES, Value};
|
|
|
|
|
|
2026-11-02 09:08:49 +00:00
|
|
|
macro_rules! digest_id {
|
|
|
|
|
($name:ident, $prefix:literal) => {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
|
|
|
pub struct $name(pub [u8; 32]);
|
|
|
|
|
|
|
|
|
|
impl fmt::Debug for $name {
|
|
|
|
|
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
|
|
|
write!(formatter, "{}", self)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl fmt::Display for $name {
|
|
|
|
|
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
|
|
|
write!(formatter, concat!($prefix, ":blake3:"))?;
|
|
|
|
|
for byte in self.0 {
|
|
|
|
|
write!(formatter, "{byte:02x}")?;
|
|
|
|
|
}
|
|
|
|
|
Ok(())
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
digest_id!(SourceId, "runa-source:v1");
|
|
|
|
|
digest_id!(ImplementationId, "runa-implementation:v1");
|