Skip to content

Commit

Permalink
Bump to 0.4.0
Browse files Browse the repository at this point in the history
Signed-off-by: Andrej Orsula <[email protected]>
  • Loading branch information
AndrejOrsula committed Mar 5, 2024
1 parent b3e305d commit 8b763ab
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/AndrejOrsula/pyo3_bindgen"
rust-version = "1.74"
version = "0.3.1"
version = "0.4.0"

[workspace.dependencies]
pyo3_bindgen = { path = "pyo3_bindgen", version = "0.3.1" }
pyo3_bindgen_engine = { path = "pyo3_bindgen_engine", version = "0.3.1" }
pyo3_bindgen_macros = { path = "pyo3_bindgen_macros", version = "0.3.1" }
pyo3_bindgen = { path = "pyo3_bindgen", version = "0.4.0" }
pyo3_bindgen_engine = { path = "pyo3_bindgen_engine", version = "0.4.0" }
pyo3_bindgen_macros = { path = "pyo3_bindgen_macros", version = "0.4.0" }

assert_cmd = { version = "2" }
clap = { version = "4.5", features = ["derive"] }
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Add `pyo3` as a dependency and `pyo3_bindgen` as a build dependency to your [`Ca
pyo3 = { version = "0.20", features = ["auto-initialize"] }

[build-dependencies]
pyo3_bindgen = { version = "0.3" }
pyo3_bindgen = { version = "0.4" }
```

### <a href="#-option-1-build-script"><img src="https://rustacean.net/assets/rustacean-flat-noshadow.svg" width="16" height="16"></a> Option 1: Build script
Expand Down Expand Up @@ -142,7 +142,7 @@ Enable the `macros` feature of `pyo3_bindgen`.

```toml
[build-dependencies]
pyo3_bindgen = { version = "0.3", features = ["macros"] }
pyo3_bindgen = { version = "0.4", features = ["macros"] }
```

Then, you can call the `import_python!` macro anywhere in your crate.
Expand All @@ -157,7 +157,7 @@ pub use py_module::*;
This project is in early development, and as such, the API of the generated bindings is not yet stable.

- Not all Python types are mapped to their Rust equivalents yet. For this reason, some additional typecasting might be currently required when using the generated bindings (e.g. `let typed_value: py_module::MyClass = get_value()?.extract()?;`).
- The binding generation is primarily designed to be used inside build scripts or via procedural macros. Therefore, the performance of the codegen process is [benchmarked](./pyo3_bindgen_engine/benches/bindgen.rs) to understand the potential impact on build times. Here are some preliminary results for version `0.3.0` with the default configuration (measured: parsing IO & codegen | not measured: compilation of the generated bindings, which takes much longer):
- The binding generation is primarily designed to be used inside build scripts or via procedural macros. Therefore, the performance of the codegen process is [benchmarked](./pyo3_bindgen_engine/benches/bindgen.rs) to understand the potential impact on build times. Here are some preliminary results for version `0.3` with the default configuration (measured: parsing IO & codegen | not measured: compilation of the generated bindings, which takes much longer):
- `sys`: 1.24 ms (0.66k total LoC)
- `os`: 8.38 ms (3.88k total LoC)
- `numpy`: 1.02 s (294k total LoC)
Expand Down
4 changes: 2 additions & 2 deletions pyo3_bindgen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! pyo3 = { version = "0.20", features = ["auto-initialize"] }
//!
//! [build-dependencies]
//! pyo3_bindgen = { version = "0.3" }
//! pyo3_bindgen = { version = "0.4" }
//! ```
//!
//! ### <a href="#-option-1-build-script"><img src="https://rustacean.net/assets/rustacean-flat-noshadow.svg" width="16" height="16"></a> Option 1: Build script
Expand Down Expand Up @@ -67,7 +67,7 @@
//!
//! ```toml
//! [build-dependencies]
//! pyo3_bindgen = { version = "0.3", features = ["macros"] }
//! pyo3_bindgen = { version = "0.4", features = ["macros"] }
//! ```
//!
//! Then, you can call the `import_python!` macro anywhere in your crate.
Expand Down

0 comments on commit 8b763ab

Please sign in to comment.