Registry / other / python3-sys

python3-sys

JSON →
library0.7.2rscratesunverified

FFI Declarations for Python 3, enabling Rust to interface with the Python C API.

# Cargo.toml [dependencies] python3-sys = "0.7.2"
INSTALL
IMPORT
SIG · PYTHON3-SYS
P
python3-sys
otherrustv0.7.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PyObject
use python3_sys::PyObject;

Initializes Python and prints its version using FFI calls.

use python3_sys::PyObject; // This is a low-level FFI crate; typically used via higher-level wrappers. // Example: calling Py_Initialize from python3-sys unsafe { python3_sys::Py_Initialize(); let version = python3_sys::Py_GetVersion(); println!("Python version: {:?}", std::ffi::CStr::from_ptr(version)); python3_sys::Py_Finalize(); }
Debug
Known issues
gotchaRequires Python 3 development headers to be installed on the system.
fix
Install python3-dev or python3-devel package before building.
affects: *
Upgrade
Version history
0.7.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
python3-sys — cargo add python3-sys · libregistry