This repository has it role as a containerized development environment for building Rust applications.
The environment uses:
- Debian bookworm as a stable OS in combination with Neovim
- Rust toolchain (
rustc,cargo,rust-analyzer). - Neovim (v0.11.4) | As a preferred choice of coding.
- PostgreSQL | To integrate a database service for future applications
- The standard build tools (
clang,lld,git..)
- [Docker] (https://www.docker.com/get-started)
- [Docker Compose] (https://docs.docker.com/compose/install/)
- SSH Key for git authentication
- SSH Key not added to Github/Gitlab already
ssh-keygen -t ed25519 -C "[email protected]"
cat ~/.ssh/id_ed25519.pub << "Add this inside of GitHub or GitLab"
# Test your key...
ssh -T [email protected]
ssh -T [email protected] - Clone the repository (with submodule for neovim config):
git clone --recurse-submodules https://github.com/0Nulliu/rust_dev_environment cd rust_dev_environment - Prepare SSH: (step needs to be repeated on every access for safety)
This environment uses SSH forwarding to securely handle Git credentials. Run these commands.
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519 newgrp docker (alternative is to add docker as a USER)
- Build and start (only need to run once):
docker-compose up -d --build
- Enter the Docker:
docker-compose up -d docker-compose exec dev bash - Happy days! and Happy coding!
cd /home/devuser/project
cargo new future_billion_dollar_company
cd future_billion_dollar_company
nvim .- When you're done shut down the containers
docker-compose downPostgreSQL is a bit shifty right now, future instructions will be given once I've set it up better.
Yes there is a .nvim.conf situated inside of the ~/devuser/project