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>
20 lines
387 B
TOML
20 lines
387 B
TOML
[build-system]
|
|
requires = ["maturin>=1.7,<2"]
|
|
build-backend = "maturin"
|
|
|
|
[project]
|
|
name = "swactor"
|
|
version = "0.1.0"
|
|
requires-python = ">=3.9"
|
|
|
|
[dependency-groups]
|
|
dev = ["jupyter", "ipykernel"]
|
|
|
|
[tool.uv]
|
|
cache-keys = [
|
|
{ file = "pyproject.toml" },
|
|
{ file = "Cargo.toml" },
|
|
{ file = "src/**/*.rs" },
|
|
{ file = "../../Cargo.toml" },
|
|
{ file = "../../src/**/*.rs" },
|
|
]
|