I have some code in
build.rs that breaks when compiling under RLS in the editor. Even if it did work, it probably shouldn’t run.
What’s the most straightforward way to avoid executing
build.rs during syntax checking in VS Code, but let it run for cargo builds from the command line?
- I thought about checking an environment variable but I can’t work out how to set one that’s specific to RLS
- I’m currently just commenting out the contents of
main()in build.rs which works great but it’s getting old