Description
Currently there a handful of Rust/Cargo issues surrounding feature selection in workspaces, e.g., rust-lang/cargo#4463. I think the missing possible key in the whole thing, ignoring ideas like changing the features model itself, is that there is no concept similar to a "Solution" like in an IDE like Visual Studio, e.g., a named configuration that binds target/package/features for easy switching. The parts are all here, but it requires manually swapping the analyzer settings in settings.json
and the default-members
in the workspace Cargo.yaml
.
So what about adding functionality to the vscode extension like that in the Python one where different environments can be set up? For me the use case is reproducibly swapping between working on a static library package for embedding into mobile, and a Linux-based server binary, both of which have different feature flags. And those feature flags expand/propagate into the library dependencies in the workspace/monorepo which conditionally include code.