Rls: RLS builds all binaries with `all_targets` set to false

Created on 28 May 2019  ·  2Comments  ·  Source: rust-lang/rls

My project setup includes a workspace with one library and one binary crate (that includes multiple binaries).

If a change a file, VScode + RLS is much slower than a plain cargo check. RLS seems to always check all binaries (judging by the RLS info in the bottom bar).

So currently on every change RLS runs for half a minute in my case, even though it would just need to check one binary.

cargo check on the other hand does a much faster incremental check.

Most helpful comment

With all_targets set to false, RLS no longer builds binaries from all crates in a workspace nor tests. But it still compiles all binaries in one crate. Also tried the build_bin setting - didn't help.
My current config:

    "settings": {
        "rust.show_warnings": false,
        "rust.unstable_features": true,
        "rust.build_bin": "some_binary",
        "rust.all_targets": false
    },

All 2 comments

Try disabling the all_targets config of RLS. By default it does performs closer to cargo check --all, which is why it takes longer.

With all_targets set to false, RLS no longer builds binaries from all crates in a workspace nor tests. But it still compiles all binaries in one crate. Also tried the build_bin setting - didn't help.
My current config:

    "settings": {
        "rust.show_warnings": false,
        "rust.unstable_features": true,
        "rust.build_bin": "some_binary",
        "rust.all_targets": false
    },
Was this page helpful?
0 / 5 - 0 ratings

Related issues

parkovski picture parkovski  ·  3Comments

FrankvdStam picture FrankvdStam  ·  3Comments

jaccarmac picture jaccarmac  ·  3Comments

paulirotta picture paulirotta  ·  3Comments

c7hm4r picture c7hm4r  ·  5Comments