Skip to content

Commit

Permalink
added python API
Browse files Browse the repository at this point in the history
  • Loading branch information
nicelgueta committed Apr 5, 2024
1 parent 2c90424 commit 9aeea88
Show file tree
Hide file tree
Showing 6 changed files with 318 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/target
venv/
__pycache__/
.pytest_cache/
.mypy_cache/
228 changes: 227 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustyrs"
version = "0.2.4"
version = "0.3.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -10,10 +10,13 @@ name = "rustyrs"
path = "src/lib.rs"
crate-type = ["cdylib", "lib"]


[features]
wasm = ["wasm-bindgen", "getrandom"]
python = ["pyo3"]

[dependencies]
rand = "0.8.5"
wasm-bindgen = {version = "0.2.92", optional = true}
getrandom = { version = "0.2", features = ["js"], optional = true }
getrandom = { version = "0.2", features = ["js"], optional = true }
pyo3 = { version = "0.21.1", features = ["extension-module"], optional = true }
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
test:
cargo test
python:
maturin develop --release --features python
wasm:
wasm-pack build --target web --features wasm
Loading

0 comments on commit 9aeea88

Please sign in to comment.