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>
33 lines
658 B
TOML
33 lines
658 B
TOML
[workspace]
|
|
members = [".", "crates/swactor-python", "crates/swactor-wasm"]
|
|
exclude = ["tools/depgraph"]
|
|
|
|
[package]
|
|
name = "swactor"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
autobenches = false
|
|
|
|
[lib]
|
|
crate-type = ["rlib"]
|
|
|
|
[features]
|
|
default = ["getrandom"]
|
|
getrandom = ["dep:getrandom"]
|
|
no_random = [] # compile without access to a source of randomness
|
|
|
|
[dependencies]
|
|
getrandom = { version = "0.2", optional = true }
|
|
crossbeam-queue = "0.3.12"
|
|
crossbeam-utils = "0.8.21"
|
|
|
|
[dev-dependencies]
|
|
criterion = { version = "0.5", features = ["html_reports"] }
|
|
|
|
[[bench]]
|
|
name = "runtime_benchmarks"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "worker_benchmarks"
|
|
harness = false
|