Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

VSCode configuration

This chapter covers how to setup Visual Studio Code to get features in-editor linting, go to definition, documentation on hover, inlay hints.

Extensions

Rust language support is provided by rust-analyzer, available on the Visual Studio Marketplace and Open VSX Registry for open source forks of VSCode.

It is also recommended to use the the Even Better TOML exentsion to have TOML support when editing Cargo.toml files: Visual Studio Marketplace, Open VSX Registry.

Dependi can be used to view information about crates and their available versions: Visual Studio Marketplace, Open VSX Registry.

Configuration for developing Ariel OS apps

This is meant to be used on projects created using the cargo-generate command in the getting-started guide. The configuration works by targeting one board, avoiding the linter to be confused about double declarations.

You will need to have a nightly version of Rust installed, you can install the latest one using:

rustup toolchain install nightly

Then install configure the toolchain by running this at the root of your project:

laze build -D CARGO_TOOLCHAIN=+nightly install-toolchain

To generate/update your vscode configuration in .vscode/settings.json, run in the root of your project:

laze build -b <board> vscode-config

With <board> being the laze identifier of a board your application will run on (e.g. nrf52840dk).

If you get an error about the JSON file being malformated, you may have comments or trailing commas in your configuration, try removing them in .vscode/settings.json.