This reverts commit 7ad44edd18.
Listen address 0.0.0.0 is necessary for docker, because port forwarding for Docker
is just NAT, so port forwarding alone is not sufficient
Fixes#879
rust-analyzer now requires rustup to be installed
## Motivation
The previous implementation bundled rust-analyzer binaries that quickly
became outdated and required manual updates to Serena's codebase. This
caused version mismatches between the bundled rust-analyzer and users'
actual Rust toolchain versions.
## Changes
- Remove RuntimeDependency-based binary bundling for rust-analyzer
- Use rustup-managed rust-analyzer from the user's toolchain
- Add automatic installation of rust-analyzer component if missing
- Install rustup with minimal profile in Docker images
## Rationale
Rust development universally relies on rustup for toolchain management.
Unlike some other languages where system packages or bundled binaries
make sense, Rust developers already have rustup installed and expect
tools to use their toolchain's versions.
This approach ensures:
- rust-analyzer always matches the user's Rust version
- No outdated binaries shipped with Serena
- Automatic updates via `rustup update`
- Consistency with Rust ecosystem expectations
The LSP API of rust-analyzer is stable enough that version differences
are not a concern. If users don't have rustup, they'll get a clear error
message - this is acceptable since you cannot meaningfully develop Rust
without rustup.
## Docker Support
Added rustup installation to Docker images to ensure Rust support works
in containerized environments. Uses minimal profile to reduce image size
while still providing full rust-analyzer functionality.
- Introduced `.github/workflows/docker.yml` for building and pushing Docker images.
- Updated `Dockerfile` to split stages for `base`, `development`, and `production`.
- Added `compose.yaml` for Docker Compose setups.
- Enhanced `README.md` with Docker usage instructions.