Skip to content

Using VS Code/rust-analyzer with cargo 3ds #127

Answered by Meziu
DeltaF1 asked this question in Q&A
Discussion options

You must be logged in to vote

This behaviour also happens when normally executing this build command (rather than cargo 3ds build):
cargo build --target armv6k-nintendo-3ds -Zbuild-std --lib

You just need to export the env configuration you can see around here.

In simpler terms, add RUSTFLAGS="-L/opt/devkitpro/libctru/lib -lctru" to your env.

{
  "rust-analyzer.cargo.extraEnv": { "RUSTFLAGS": "-L/opt/devkitpro/libctru/lib -lctru" }
}

As any good programmer would, I don't use this, because I much prefer having rust-analyzer spit wrong errors than having to use a configuration file for VSCode :P

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@DeltaF1
Comment options

Answer selected by Meziu
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants