Sausage spike: host (broker, supervisors, commit-on-close fs, cargo actor, console), agent actor, examples

This commit is contained in:
2026-10-15 04:47:00 +01:00
commit 83bbbb33a8
29 changed files with 6602 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
[package]
name = "echo"
version = "0.1.0"
edition = "2024"
[dependencies]
serde_json = "1"
+15
View File
@@ -0,0 +1,15 @@
use serde_json::{json, Value};
use std::io::{BufRead, Write};
fn main() {
let mut out = std::io::stdout().lock();
for line in std::io::stdin().lock().lines() {
let Ok(msg) = serde_json::from_str::<Value>(&line.unwrap()) else { continue };
if msg["body"]["type"] == "shutdown" {
break;
}
let env = json!({"to": msg["from"], "reply_to": msg["id"], "body": {"type": "echo", "got": msg["body"]}});
writeln!(out, "{env}").unwrap();
out.flush().unwrap();
}
}