@@ -50,28 +50,31 @@ class RustExtension:
50
50
"""Used to define a rust extension module and its build configuration.
51
51
52
52
Args:
53
- target: The full name of the extension, including any packages i.e.
54
- *not* a filename or pathname, but Python dotted name. It is possible to
55
- specify multiple binaries, if extension uses ``Binding.Exec`` binding mode.
56
- In that case first argument has to be dictionary. Keys of the
57
- dictionary corresponds to compiled rust binaries and values are full
58
- name of the executable inside python package.
59
- path: Path to the ``Cargo.toml`` manifest file
60
- args: A list of extra argumenents to be passed to cargo.
61
- features: A list of features to also build.
53
+ target: The full Python dotted name of the extension, including any
54
+ packages, i.e *not* a filename or pathname. It is possible to
55
+ specify multiple binaries, if extension uses ``Binding.Exec``
56
+ binding mode. In that case first argument has to be dictionary.
57
+ Keys of the dictionary corresponds to compiled rust binaries and
58
+ values are full name of the executable inside python package.
59
+ path: Path to the ``Cargo.toml`` manifest file.
60
+ args: A list of extra argumenents to be passed to Cargo. For example,
61
+ ``args=["--no-default-features"]`` will disable the default
62
+ features listed in ``Cargo.toml``.
63
+ features: A list of Cargo features to also build.
62
64
rust_version: Minimum Rust compiler version required for this
63
65
extension.
64
66
quiet: Suppress Cargo's output.
65
67
debug: Controls whether ``--debug`` or ``--release`` is passed to
66
- cargo. If set to `None` (the default) then build type is auto-detect.
67
- Inplace build is debug build otherwise release.
68
- binding: Controls which python binding is in use.
68
+ Cargo. If set to `None` (the default) then build type is
69
+ automatic: ``inplace`` build will be a debug build, ``install``
70
+ and ``wheel`` builds will be release.
71
+ binding: Informs ``setuptools_rust`` which Python binding is in use.
69
72
strip: Strip symbols from final file. Does nothing for debug build.
70
73
script: Generate console script for executable if ``Binding.Exec`` is
71
74
used.
72
75
native: Build extension or executable with ``--target-cpu=native``.
73
- optional: if it is true, a build failure in the extension will not
74
- abort the build process, but instead simply not install the failing
76
+ optional: If it is true, a build failure in the extension will not
77
+ abort the build process, and instead simply not install the failing
75
78
extension.
76
79
py_limited_api: Similar to ``py_limited_api`` on
77
80
``setuptools.Extension``, this controls whether the built extension
0 commit comments