A Dockerized Rust Language Server
Find a file
2025-01-19 10:15:23 -05:00
docker Separated Docker Files for Cargo & Rust Analyzer 2025-01-19 10:15:15 -05:00
README.md Updated README 2025-01-19 10:13:05 -05:00

Rust-LS

A Dockerized Rust Language Server

Install steps

Setting up Virtual Environments

The first and most important steps are to build the docker images, as they are the boilerplate of this language server. Just run the following commands while in the Rust-LS directory.

./scripts/cargo/docker.sh
./scripts/rust-analyzer/docker.sh

After that, you'll want to trick your system into thinking you already have both installed on your actual machine. To do that, just run the following commands:

sudo ln -s /path/to/scripts/cargo/cargo /bin/cargo
sudo ln -s /path/to/scripts/rust-analyzer/rust-ls /bin/rust-anaylzer

To test if your setup works as intended, just run rust-analyzer --version and cargo --version and they should both spit back their respective versions.

Setting up IDE

Download the Rust-Analyzer extension from the VSCode store and set the following paths:

Field Path
Cargo /bin/cargo
Server /bin/rust-analyzer

After that, it should work as intended!