Skip to content

Commit f9bf829

Browse files
committed
idk
1 parent 3290285 commit f9bf829

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

.gitignore

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
/tmp/
22
/.direnv/
33

4-
# Generated by Cargo
5-
# will have compiled files and executables
64
/debug/
75
/target/
6+
/crates/*/target/
87

9-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
10-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
11-
/Cargo.lock
8+
__pycache__
129

1310
# These are backup files generated by rustfmt
1411
**/*.rs.bk
15-
1612
# MSVC Windows builds of rustc generate these, which store debugging information
1713
*.pdb

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
check: rust-check rust-check-fmt
44

55
rust-check:
6-
cargo clippy --all-targets --all-features -- -D warnings -W clippy::pedantic
6+
cargo clippy --all-targets --all-features -- # -D warnings -W clippy::pedantic
77

88
rust-check-fmt:
99
cargo fmt --all -- --check

examples/simple.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
import ast, inspect
1+
import ast
2+
import inspect
23

34
import benda
45
from benda import u24
56

6-
def test_1():
7-
return 4
87

9-
def test_2():
8+
def simple():
109
x = u24(3)
1110
y = x - u24(2)
1211
return y
1312

14-
def get_ast():
15-
my_ast = ast.dump(ast.parse(inspect.getsource(test_2)))
16-
return my_ast
1713

1814
if __name__ == "__main__":
19-
print(get_ast())
20-
print(test_2())
15+
translated_simple = bjit(simple)
16+
print(simple())
17+
print(translated_simple())

0 commit comments

Comments
 (0)