I’m setting up a development environment where all build tooling and compilation happens inside a Docker container, but source editing is done on the host machine. The source code is mapped to the host filesystem, and the container runs cargo watch
to pick up changes near-instantly, and engineers don’t need to install any Rust tooling locally. The goal is to have a devstack experience where the developer simply installs Docker, their favorite IDE, and nothing else. Since the “dev stack” is comprised of microservices each written in a different language, all those microservices come with their own containerized development setup, and the developer doesn’t need to install build toolchain necessary to work on each microservice.
However, I’m running into a challenge with rust-analyzer. Is there any way to run it inside the Docker container while still allowing the host IDE to communicate with it? I would very much prefer not to map the target/
directory onto the host, and not to run rust-analyzer on the host, but have the IDE communicate with it across the container boundary.
Any insights would be greatly appreciated!