-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Description
Assumptions
- problematic toolchain
--rustc 1.70.0-nightly (db0cbc48d 2023-03-26)
--rustc 1.70.0-nightly (478cbb42b 2023-03-28) - toolchain not affected
--rustc 1.68.0-stable
Description
wheel package generation fails with latest toolchain, when crate-type = ["cdylib"] is not contained in Cargo.toml.
Cause
The following command in build process will not work:
cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features 'python pyo3/extension-module' --no-default-features -- --crate-type cdylib
Instead, following works:
cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features 'python pyo3/extension-module' --no-default-features --crate-type cdylib
Workaround
any of the following avoids the bug:
- Write
crate-type = ["cdylib"]inCargo.toml - Write
args=["--crate-type", "cdylib"]in initializer ofRustExtension
Sample:
RustExtension(
'namespace.package', 'Cargo.toml',
binding = Binding.PyO3,
args = ["--crate-type", "cdylib"],
)I will create PRs later.
Metadata
Metadata
Assignees
Labels
No labels