Commit graph

12 commits

Author SHA1 Message Date
4e56590f05 feat: wasm runner actor skeleton (#32)
Lay down the wasm-actor host, a frontend-agnostic command layer, and a
distribution registry.

- command (new crate): CommandRouter dispatching to built-in inspection handlers
  (overview/workers/actors) plus user-registered handlers, with line and
  query-param parsers; built for REPL/REST/TUI/WebSocket frontends.
- wasm-actor (new crate): skeleton host — WasmActor, Builder, Engine, error
  types — with echo/double/silent guest fixtures and integration tests.
- distribution: add Registry (member catalog + lookups) and Snapshot, with tests.
- core: extend the worker watch API; add watch_api integration tests.

Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-13 07:42:44 +00:00
3c29293945 feat(std): add supervision, router, and registries
Adds the std crate on top of the core runtime: Supervisor with RestartPolicy
(Permanent/Transient/Temporary) and SupervisorStrategy (OneForOne/OneForAll/
RestForOne), Router with RoutingStrategy, name/monitor/group registries, StdExtension,
and Ctx/Runtime extension traits. Also extends core (worker, actor, delivery identity
hashing, config, stats), adds a fuzz target, a proptest suite, expands runtime_api
tests, and adds cfuzz cycle notes + benchmarks.


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-13 07:11:24 +00:00
133762f1be feat: tui, agent interface, stats hook (#29)
Runtime dashboard now features a TUI option and an interface for LLM tool use. Removed some bloat from stats collecting and replaced with a hook function to dump runtime stats into.


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-11 15:23:26 +00:00
74b92d71ab refactor(core): lock-free tick timings, infallible channel push (#28)
Make mailbox push infallible and replace the locked tick-timing buffer with a
lock-free ring.

- channel: HybridChannel::push and Sender::send now return () — overflow always
  absorbs, never rejects — dropping the Result<(), T> surface and its callers.
- stats: tick_timings moves from Mutex<VecDeque> to a lock-free crossbeam
  ArrayQueue (drop-oldest-on-full), removing the per-tick lock.
- ripple the signature change through worker/runtime/config; drop worker_benchmarks.
- expand runtime_api tests around the new channel/stats shapes.

Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-10 07:35:58 +00:00
6fd3e1e635 refactor(core): fuzz-driven runtime cleanup and api tests (#22)
Trim runtime/worker/channel per coverage-fuzz findings; expand runtime_api tests; drop worker_benchmarks.


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-09 07:24:16 +00:00
ff9710d724 feat: gossip simulation (#21)
Simulate a simple push-pull epidemic broadcast.


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-08 16:18:39 +00:00
4371642a27 refactor: repack external bindings into their own crates (#19)
Split the monolithic crate into a Cargo workspace with the Python and Wasm bindings as separate member crates.

- Cargo.toml: declare a `[workspace]` with members `.`/`crates/swactor-python`/`crates/swactor-wasm`, remove the `python` feature and pyo3 dependency, and change root crate-type from `["cdylib","rlib"]` to `["rlib"]`
- crates/swactor-python: new cdylib crate re-exporting the PyO3 bindings (Runtime/RuntimeConfig/RuntimeHandle/Inbox/Ctx/ActorAddress/RuntimeStats), depending on `swactor` + pyo3; pyproject.toml and uv.lock relocated here from the root
- crates/swactor-wasm: new cdylib crate moved from top-level `wasm/`, depending on `swactor` with `no_random` features
- src/actor.rs: widen `Actor::new`, `AnyActor`, `ContextInner`, and `Ctx::raw_inner` to `pub` so the separate binding crates can drive the runtime
- src/lib.rs: delete the in-tree `python` module and `#[pymodule]`, and gate the `no_random` RNG behind `all(feature = "no_random", not(feature = "getrandom"))`
- tools/: relocate package.json/package-lock.json; drop the now-duplicate `wasm/Cargo.lock`

Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-07 17:39:02 +00:00
Zachery Aaron Shores-Chmielewski
3072d5cf8c feat: refactor based on spectral spectral_analysis
Asking the agent to refactor to reduce spectral complexity, it worked. Trivial change, but this did reduce code complexity.


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-07 17:36:45 +07:00
Zachery Aaron Shores-Chmielewski
69cd11849d feat: worker thread api (#6)
Make the worker thread api clearly seperated and ready for test harness


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-06 21:45:19 +07:00
e2c4f55941 refactor: major library changes (#5)
Refactoring to logically separate component modules in order to make it easier to develop tests, metrics, tracing, etc.


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-06 11:25:37 +00:00
Zachery Aaron Shores-Chmielewski
4e633375d5 feat: Stress tests, benchmarking, and non-failing queues and inboxes #3
Adds some basic benchmarking, stress tests. They still need to be properly examined to ensure they are testing the correct properties, but fit for "good enough". Implements the HybridChannel type, which features a channel buffer that can withstand overflows. It does so by providing a dequeue behind a mutex. Without overflow, will push messages into the lock free ArrayQueue implemented by crossbeam_queue; when that buffer fills, will use the locking portion provided by the Mutex<VecDequeue>.

In the future we can even further optimize this, perhaps with some linked list implementations of lock-free channels, but, like the benchmarks, this fits the "good enough" bar for now.


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-01-26 14:14:00 +07:00
33956d7f22 feat: Multithreaded runtime (#2)
Implements a tunable configuration for a single or multi-threaded runtime.

Reviewed-on: http://zachery.lol/code/code/zacheryasc/swactor/pulls/2


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-01-25 13:38:34 +00:00