A Dockerized Rust Language Server
Dockerfile | ||
README.md | ||
rust-ls |
Rust-LS
A Dockerized Rust Language Server
Install steps
- Build the docker image with the following command:
docker build . -t rust-ls
- 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 "$@"
- 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.
- 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 "$@"