-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
buildImprovements and fixes to build system, CI, etc.Improvements and fixes to build system, CI, etc.
Description
Because we're using Meson as our build system (mostly), we don't get automatic discovery of Rust projects in rust-analyzer. rust-analyzer also does not share the same Cargo home as Meson, so everything gets compiled twice. It especially hurts when modifying lock files, since everything gets downloaded twice.
In my local .vscode/settings.json file, I have the following to make rust-analyzer work properly:
{
"rust-analyzer.cargo.extraEnv": {
"CARGO_HOME": "/home/isaiah/Development/rust/linux-webauthn-platform-api/build/cargo-home"
},
"rust-analyzer.runnables.extraEnv": {
"CARGO_HOME": "/home/isaiah/Development/rust/linux-webauthn-platform-api/build/cargo-home"
},
"rust-analyzer.check.extraEnv": {
"CARGO_HOME": "/home/isaiah/Development/rust/linux-webauthn-platform-api/build/cargo-home"
},
"rust-analyzer.server.extraEnv": {
"CARGO_HOME": "/home/isaiah/Development/rust/linux-webauthn-platform-api/build/cargo-home"
},
"rust-analyzer.linkedProjects": [
"credentialsd-common/Cargo.toml",
"credentialsd-ui/Cargo.toml",
"credentialsd/Cargo.toml",
],
}I believe there are files you can put in a repository that will configure rust-analyzer manually. We should make one of those and at least put in the linkedProjects key in there. (I don't know if the CARGO_HOME will be useful if users don't use build for their build directory.)
Metadata
Metadata
Assignees
Labels
buildImprovements and fixes to build system, CI, etc.Improvements and fixes to build system, CI, etc.