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
Describe the bug
Rust project can have optional dependency, which will also declare a feature for this crate automatically.
For example, the Cargo.toml for a crate named dep can be like:
[package]
name = "dep"
version = "0.1.0"
edition = "2021"[dependencies]
serde = { version = "1.0.204", optional = true}[features]
# no need to declare serde as a feature cause cargo help us with it
# serde = ["serde"]
And for using the dep crate together the serde dependency of it, simply do:
dep = { path = "dep", features = ["serde"]}
However, currently in the meson build system, the serde won't be identified as a feature of the dep crate.
The toml feature for the figment crate is not identified.
Expected behavior
The feature can be automatically identified and exposed to meson build system.
system parameters
Is this a cross build or just a plain native build (for the same computer)?: plain native build.
what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.): all platform
what Python version are you using e.g. 3.8.0: >3.11
what meson --version: from master branch, 1.5.99
what ninja --version if it's a Ninja build: 1.10.1
The text was updated successfully, but these errors were encountered:
fre3dm4n
changed the title
When compiling Rust project with meson, feature of dependencies is not fully resolved
When compiling Rust project with meson, dependencies' features are not fully resolved
Jul 11, 2024
Describe the bug
Rust project can have optional dependency, which will also declare a feature for this crate automatically.
For example, the Cargo.toml for a crate named
dep
can be like:And for using the
dep
crate together theserde
dependency of it, simply do:However, currently in the meson build system, the
serde
won't be identified as a feature of thedep
crate.To Reproduce
The repository to reproduce
The
toml
feature for the figment crate is not identified.Expected behavior
The feature can be automatically identified and exposed to meson build system.
system parameters
meson --version
: from master branch, 1.5.99ninja --version
if it's a Ninja build: 1.10.1The text was updated successfully, but these errors were encountered: