diff --git a/.gitignore b/.gitignore index d9fa69d..6a456fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,10 @@ /tmp/ /.direnv/ +/venv/ + /debug/ /target/ -/crates/*/target/ __pycache__ diff --git a/Makefile b/Makefile index 71ca7f0..e47c4ce 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ .PHONY: check rust-check rust-check-fmt rust-fmt +.PHONY: create-venv build + +all: check build check: rust-check rust-check-fmt @@ -10,3 +13,12 @@ rust-check-fmt: rust-fmt: cargo fmt --all + +create-venv: + python3 -m venv venv + @echo "Enter venv with:" + @echo "source venv/bin/activate" + +build: + cd crates/benda; \ + maturin develop diff --git a/examples/simple.py b/examples/simple.py index a35d7e0..1bed79b 100644 --- a/examples/simple.py +++ b/examples/simple.py @@ -1,11 +1,8 @@ -import ast -import inspect - import benda -from benda import u24 +from benda import bjit, u24 -def simple(): +def simple() -> u24: x = u24(3) y = x - u24(2) return y