RustExtension(target, path='Cargo.toml', args=None, features=None, rustc_flags=None, rust_version=None, quiet=False, debug=None, binding=Binding.PyO3, strip=Strip.No, script=False, native=False, optional=False, py_limited_api=False)¶
Used to define a rust extension module and its build configuration.
str]]) – The full name of the extension, including any packages i.e. not a filename or pathname, but Python dotted name. It is possible to specify multiple binaries, if extension uses
Binding.Execbinding mode. In that case first argument has to be dictionary. Keys of the dictionary corresponds to compiled rust binaries and values are full name of the executable inside python package.
str) – Path to the
str]]) – A list of extra argumenents to be passed to cargo.
str]]) – A list of features to also build.
str]) – Minimum Rust compiler version required for this extension.
bool) – Suppress Cargo’s output.
bool]) – Controls whether
--releaseis passed to cargo. If set to None (the default) then build type is auto-detect. Inplace build is debug build otherwise release.
Binding) – Controls which python binding is in use.
Strip) – Strip symbols from final file. Does nothing for debug build.
bool) – Generate console script for executable if
bool) – Build extension or executable with
bool) – if it is true, a build failure in the extension will not abort the build process, but instead simply not install the failing extension.
bool) – Same as py_limited_api on setuptools.Extension. Note that if you set this to True, your extension must pass the appropriate feature flags to pyo3 (ensuring that abi3 feature is enabled).
Enumeration of possible Rust binding types supported by setuptools-rust.
Bring your own bindings for the extension.
Build an executable instead of an extension.