Commit graph

113 commits

Author SHA1 Message Date
ba52153dd9 feat: docs and README (#13)
Update the docs and readme with all the changes we've made


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-06 17:12:04 +00:00
c9d1383d1c feat: basic wasm (#12)
Unfeatured wasm module. Mostly to test that wasm builds


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-06 16:47:43 +00:00
a01c3eb5f9 feat: code DAG visualizer (#11)
Visualize the inter-module code dependency DAG


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-06 14:54:56 +00: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
fc8e766bd3 feat: jupyter example (#10)
Add a Python getting-started Jupyter notebook and reorganize the Python examples under examples/python/.

- examples/python/getting_started.ipynb: add notebook demonstrating the single-threaded tick loop (`spawn`/`send`/`tick`/`inbox`/`try_recv`) and the multi-threaded path via `RuntimeConfig` + `rt.run()`/`handle.shutdown()`
- examples/: relocate `hello_async.py` and `hello_single_thread.py` under `examples/python/`
- pyproject.toml: add a `dev` dependency group containing jupyter and ipykernel
- uv.lock: regenerate the lockfile for the new dev dependencies (2452 lines)

Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-06 14:04:48 +00:00
2fd0c412e0 feat: runtime information display (#9)
Show basic information from the runtime, such as number of actors, worker threads, etc.


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-06 13:35:46 +00:00
65614e14d3 feat: python bindings (#7)
Python bindings allowing us to interact with the library in a python REPL


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-06 12:47:51 +00: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
8aa300fbba feat: rewrite (#1)
Did not like the requirement of a tokio runtime and async/await. Rewrote
to use lock free queues (`crossbeam_queue::ArrayQueue`) as the basic
primitive to enable a runtime consisting of many pseudo-processes that
can pass messages to each other.

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


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-01-23 05:00:57 +00:00
Zachery Aaron Shores-Chmielewski
759acc622d feat: types for request/response handling
Introduce a typed `ActorRequestSender` connection handle for actors and harden the `Error` type.

- src/lib.rs: add `ActorRequestSender<A>` wrapping `mpsc::Sender<ActorRequest<A>>` with async `send`, `Clone`, and `From` impls; expose it via new `Handle::get_connection()` so callers hold a lightweight standalone connection to an actor
- src/lib.rs: route `Handle::send` through the new sender and store `tx` as an `ActorRequestSender`; drop the `Unpin` supertrait bound from the `Actor` trait
- src/error.rs: turn the `Error` type alias into a newtype struct, gate `convert_err` as `pub(crate)`, and add `From<T: AsRef<str>>` plus `ToString` impls
- examples/hello.rs: switch `Greeter::spawn` to method-call syntax (`Greeter.spawn(&rt)`) to match the updated API
- README.md: rename the project heading from "about" to "swactor"

Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2025-11-25 20:51:13 -05:00
Zachery Aaron Shores-Chmielewski
88121780ce init
Skeletal actor framework. Somewhat unweildy, needs a message box, a better runtime, and different channels. However, hello world example works


Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2025-11-24 19:39:17 -05:00