A Dockerized Rust Language Server
Find a file
2024-06-20 13:03:55 -04:00
Dockerfile Base Upload 2024-06-20 13:03:55 -04:00
README.md Base Upload 2024-06-20 13:03:55 -04:00
rust-ls Base Upload 2024-06-20 13:03:55 -04:00

Rust-LS

A Dockerized Rust Language Server

Install steps

  1. Build the docker image with the following command:
docker build . -t rust-ls
  1. Initilize your project's Cargo.lock file by creating a project with Cargo Init [PROJECT_NAME] and replace the following section of the rust-ls file (Delete the text inside []):
docker run -i --rm -u $(stat -c '%u:%g' .) -v "$PWD:$PWD:[ro,z]Z" -w "$PWD" rust-ls "$@"
  1. Open Visual Studio Code with the rust-analyzer extension, and edit the rust-analyzer server directory to where the rust-ls file is. Open your project directory and let it initilize.
  2. Delete the junk target folder. and modify your *rust-ls back to the original state
docker run -i --rm -u $(stat -c '%u:%g' .) -v "$PWD:$PWD:Z" -w "$PWD" rust-ls "$@"

You should be all set!