cargo: 使用 Meson 的 default_library,而不是 Cargo.toml 中的 crate_type
作者: xclaesse创建于 2025年10月29日更新于 2026年9月11日
标签module:rust
当 `Cargo.toml` 中例如设置了 `crate_type = ["staticlib", "cdylib"]` 时,使用 `library(..., rust_abi: 'c')` 而不是 `both_libraries()` 来向 Meson 进行共享和/或静态的选择,而不是遵循 `Cargo.toml` 中的设置,是有意义的。
内容来源: mesonbuild/meson