You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sysinfo's Cargo.toml builds as both an rlib and cdylib according to the crate-types in its Cargo.toml. However, when used as a dependency by another Rust target, the cdylib is completely unnecessary; in the best case it adds time to the build, and in the worst case it can actually get in the way of the desired build (if the root build product is a staticlib and the current target isn't set up with a dynamic linker).
This has come up before (#246), but now that Cargo supports overriding crate-type, sysinfo has the option to declare itself as only building an rlib by default, and adding --crate-type cdylib to the instructions for integrating with C instead (or rather the Makefile). Furthermore, it suggests that C integration could use static or dynamic linking, by using --crate-type staticlib instead.
The caveat is that cargo rustc --crate-type was added in Rust 1.61, and this crate's MSRV is 1.59. But since the cdylib will only ever be used by someone building sysinfo directly, I think it's reasonable to bump that particular use case's MSRV-in-practice while still treating the crate's base MSRV as 1.59.
The text was updated successfully, but these errors were encountered:
sysinfo's Cargo.toml builds as both an
rlib
andcdylib
according to the crate-types in its Cargo.toml. However, when used as a dependency by another Rust target, the cdylib is completely unnecessary; in the best case it adds time to the build, and in the worst case it can actually get in the way of the desired build (if the root build product is astaticlib
and the current target isn't set up with a dynamic linker).This has come up before (#246), but now that Cargo supports overriding
crate-type
, sysinfo has the option to declare itself as only building anrlib
by default, and adding--crate-type cdylib
to the instructions for integrating with C instead (or rather the Makefile). Furthermore, it suggests that C integration could use static or dynamic linking, by using--crate-type staticlib
instead.The caveat is that
cargo rustc --crate-type
was added in Rust 1.61, and this crate's MSRV is 1.59. But since the cdylib will only ever be used by someone buildingsysinfo
directly, I think it's reasonable to bump that particular use case's MSRV-in-practice while still treating the crate's base MSRV as 1.59.The text was updated successfully, but these errors were encountered: