Skip to content
Snippets Groups Projects
Commit 74d75324 authored by Per's avatar Per
Browse files

rust nightly-2017-10-30

parent e25a84c5
No related branches found
No related tags found
No related merge requests found
......@@ -36,9 +36,9 @@ and get information on the status of `rustup`
rustup show
```
Nightly tool chains allow for the development of libraries and applations including `unsafe` code using features not available on the `stable channel` (which will be necessary for the later excercises). For some tools to work (`rls/rustfmt`) you need to install additional components. For this to work, you should use a nightly toolchain for which all tools and components work (currently `nightly-2017-10-22-x86_64-unknown-linux-gnu` is the latest). Here is an example:
Nightly tool chains allow for the development of libraries and applations including `unsafe` code using features not available on the `stable channel` (which will be necessary for the later excercises). For some tools to work (`rls/rustfmt`) you need to install additional components. For this to work, you should use a nightly toolchain for which all tools and components work (currently `nightly-2017-10-30` is the latest). Here is an example:
```
rustup default nightly-2017-10-22-x86_64-unknown-linux-gnu
rustup default nightly-2017-10-30
rustup component add rls-preview
rustup component add rust-analysis
rustup component add rust-src
......@@ -71,13 +71,13 @@ Dependencies (may) include a minimal version, following the [semver](http://semv
See [rls](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust) for installing the RLS extension.
You will need to pin the specific toolchain version used, by setting the `"rust-client.channel": "nightly-2017-10-24"` in your `vscode` *user* settings (this will be stored in a file `~/.config/Code/User/settings.json` and used for all your `vscode` projects. Settings may be set individually for each *workspace*, overriding the defaults. Regarding the `"rust-client.channel"` setting, a *workspace* setting would force the specific version (overriding the default), and may not work when code is distributed (as other developers may be on other toolchains).
You will need to pin the specific toolchain version used, by setting the `"rust-client.channel": "nightly-2017-10-30"` in your `vscode` *user* settings (this will be stored in a file `~/.config/Code/User/settings.json` and used for all your `vscode` projects. Settings may be set individually for each *workspace*, overriding the defaults. Regarding the `"rust-client.channel"` setting, a *workspace* setting would force the specific version (overriding the default), and may not work when code is distributed (as other developers may be on other toolchains).
For RLS to work, `vscode` need a path to the `rls-preview` library (using the environment variable `LD_LIBRARY_PATH`).
For RLS to work, `vscode` need a path to the `rls-preview` library (using the environment variable `LD_LIBRARY_PATH` (linux), `DYLD_LIBRARY_PATH` (OSX ?)).
```
export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
```
You may add this to your `~/.bash_profile`, and start vscode (`code` is the name of the executable) in a new terminal (to ensure that the `LD_LIBRARY_PATH` is correctly set). If `code` is run from your window manager (e.g., `plasma`), make sure that the environment is set correctly.
You may add this to your `~/.bash_profile`, and start vscode (`code` is the name of the executable) in a new terminal (to ensure that the `LD_LIBRARY_PATH` (linux) `DYLD_LIBRARY_PATH` (OSX?) is correctly set). If `code` is run from your window manager (e.g., `plasma`), make sure that the environment is set correctly.
Under the hood: `rustc --print sysroot` gives you the path to the root of the current toolchain. So its important that the toolchain is set correctsy by `rustup` for this to work.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment