Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- [Performance](performance.md)
- [Type stub generation and introspection](type-stub.md)
- [Advanced topics](advanced.md)
- [Sharing types between packages](advanced/sharing-types.md)
- [Building and distribution](building-and-distribution.md)
- [Supporting multiple Python versions](building-and-distribution/multiple-python-versions.md)
- [Useful crates](ecosystem.md)
Expand Down
6 changes: 6 additions & 0 deletions guide/src/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ PyO3 exposes much of Python's C API through the `ffi` module.

The C API is naturally unsafe and requires you to manage reference counts, errors and specific invariants yourself.
Please refer to the [C API Reference Manual](https://docs.python.org/3/c-api/) and [The Rustonomicon](https://doc.rust-lang.org/nightly/nomicon/ffi.html) before using any function from that API.

## Sharing types between multiple PyO3 modules

It is possible (but complicated) to share types between multiple PyO3 packages which can be compiled and installed separately.
This allows for ecosystems of functionality to be built similar to the many packages built on top of NumPy.
While PyO3 does not yet have any built-in support for doing this, the next sub-chapter of this guide describes the general approach to doing this, as well as the safety limitations to be aware of.
Loading
Loading