API Reference - setuptools-rust documentation (original) (raw)

View this page

Toggle table of contents sidebar

class setuptools_rust.RustExtension(target, path='Cargo.toml', args=(), cargo_manifest_args=(), features=(), rustc_flags=(), rust_version=None, quiet=False, debug=None, binding=Binding.PyO3, strip=Strip.No, script=False, native=False, optional=False, py_limited_api='auto', env=None)

Used to define a rust extension module and its build configuration.

Parameters:

class setuptools_rust.RustBin(target, path='Cargo.toml', args=(), cargo_manifest_args=(), features=(), rust_version=None, quiet=False, debug=None, strip=Strip.No, optional=False, env=None)

Used to define a Rust binary and its build configuration.

Parameters:

class setuptools_rust.Binding(value)

Enumeration of possible Rust binding types supported by setuptools-rust.

PyO3

This is an extension built usingPyO3.

RustCPython

This is an extension built usingrust-cpython.

NoBinding

Bring your own bindings for the extension.

Exec

Build an executable instead of an extension.

class setuptools_rust.Strip(value)

Enumeration of modes for stripping symbols from the built extension.

No

Do not strip symbols.

Debug

Strip debug symbols.

All

Strip all symbols.