Skip to content

Commit

Permalink
docs: Add Python ABI tags documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenexp committed Nov 29, 2024
1 parent a3a9da4 commit b64dc7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ Generating version-specific `python3y.dll` import libraries
-----------------------------------------------------------

As an advanced feature, `python3-dll-a` can generate Python version
specific import libraries such as `python39.lib`.
specific import libraries such as `python39.lib` or `python313t.lib`.

See the `ImportLibraryGenerator` builder API description for details.

Maintenance
-----------

This crate embeds Module-Defitions based on the `stable_abi.toml` file from CPython.
This crate embeds Module-Definitions based on the `stable_abi.toml` file from CPython.

The upstream version of this file is located in the [CPython project][cpython]
repository under the path `Misc/stable_abi.toml`.
Expand Down
12 changes: 11 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
//! -----------------------------------------------------------
//!
//! As an advanced feature, `python3-dll-a` can generate Python version
//! specific import libraries such as `python39.lib`.
//! specific import libraries such as `python39.lib` or `python313t.lib`.
//!
//! See the [`ImportLibraryGenerator`] builder API description for details.
Expand Down Expand Up @@ -137,6 +137,9 @@ pub enum PythonImplementation {
/// Generates `python3.dll` or `pythonXY.dll` import library directly from the
/// embedded Python ABI definitions data for the specified compile target.
///
/// ABI-tagged versioned Python DLLs such as `python313t.dll` are also supported
/// via an optional string tag parameter.
///
/// Example usage
/// -------------
///
Expand Down Expand Up @@ -164,6 +167,13 @@ pub enum PythonImplementation {
/// .version(Some((3, 8)))
/// .generate(Path::new("target/python3-lib"))
/// .unwrap();
///
/// // Generate `python313t.lib` in "target/python3-lib"
/// ImportLibraryGenerator::new("x86_64", "msvc")
/// .version(Some((3, 13)))
/// .abi_tag(Some("t"))
/// .generate(Path::new("target/python3-lib"))
/// .unwrap();
/// ```
#[derive(Debug, Clone)]
pub struct ImportLibraryGenerator {
Expand Down

0 comments on commit b64dc7c

Please sign in to comment.