Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

Commit e820928

Browse files
authored
Add experimental pyo3-wrapper feature (#41)
* Fix pyo3 unit type value error * Add experimental pyo3-wrapper feature * location support
1 parent ff17f6e commit e820928

File tree

9 files changed

+11106
-443
lines changed

9 files changed

+11106
-443
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ include = ["LICENSE", "Cargo.toml", "src/**/*.rs"]
1111
[workspace]
1212
resolver = "2"
1313
members = [
14-
"ast", "core", "format", "literal", "parser",
14+
"ast", "core", "format", "literal", "parser", "parser-pyo3",
1515
"ruff_text_size", "ruff_source_location",
1616
]
1717

1818
[workspace.dependencies]
1919
rustpython-ast = { path = "ast", default-features = false }
2020
rustpython-parser-core = { path = "core", features = [] }
2121
rustpython-literal = { path = "literal" }
22+
rustpython-format = { path = "format" }
23+
rustpython-parser = { path = "parser" }
2224

2325
ahash = "0.7.6"
2426
anyhow = "1.0.45"

ast/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ visitor = []
1717
all-nodes-with-ranges = []
1818
pyo3 = ["dep:pyo3", "num-complex", "once_cell"]
1919

20+
# This feature is experimental
21+
# It reimplements AST types, but currently both slower than python AST types and limited to use in other API
22+
pyo3-wrapper = ["pyo3"]
23+
2024
[dependencies]
2125
rustpython-parser-core = { workspace = true }
2226
rustpython-literal = { workspace = true, optional = true }

0 commit comments

Comments
 (0)