Skip to content

Commit

Permalink
Add example Cargo.toml and build.rs for exposing pyo3 cfgs
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Oct 23, 2024
1 parent 9a4a9a2 commit 4e47c1b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pyo3-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@
//! - `Py_LIMITED_API`: Marks code enabled when the `abi3` feature flag is enabled.
//! - `PyPy` - Marks code enabled when compiling for PyPy.
//!
//! Add [`pyo3-build-config`] as a build dependency in your `Cargo.toml`:
//!
//! ```toml
//! [build-dependency]
//! pyo3-build-config = "VER"
//! ```
//!
//! And then either create a new `build.rs` file in the project root or modify
//! the existing `build.rs` file to call `use_pyo3_cfgs()`:
//!
//! ```rust
//! fn main() {
//! pyo3_build_config::use_pyo3_cfgs();
//! }
//! ```
//!
//! # Minimum supported Rust and Python versions
//!
//! `pyo3-ffi` supports the following Python distributions:
Expand Down

0 comments on commit 4e47c1b

Please sign in to comment.