Rust: Difference between revisions

imported>Legendofmiracles
m removed a space
imported>Legendofmiracles
m fixed a bit of language
Line 90: Line 90:
</syntaxHighlight>
</syntaxHighlight>


== shell.nix example ==
== Shell.nix example ==
<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> {} }:
Line 100: Line 100:
}
}
</syntaxHighlight>
</syntaxHighlight>
This will have the stable rust compiler + the official formatter and linter inside the ephemeral shell. It'll also set the RUST_SRC_PATH environment variable to point to the right location, so that tools like rust-analyzer will work.
This will have the stable rust compiler + the official formatter and linter inside the ephemeral shell. It'll also set the RUST_SRC_PATH environment variable to point to the right location, which tools, such as rust-analyzer, require to be set.


== FAQ ==
== FAQ ==