### Install Dependencies (Linux) Source: https://github.com/lukemathwalker/zero-to-production/blob/main/README.md Installs necessary development tools and libraries on Ubuntu Linux, including a linker, C compiler, and PostgreSQL client. These are prerequisites for building Rust backend applications. ```bash # Ubuntu sudo apt-get install lld clang libssl-dev postgresql-client # Arch sudo pacman -S lld clang postgresql ``` -------------------------------- ### Initialize Database with Docker Source: https://github.com/lukemathwalker/zero-to-production/blob/main/README.md Launches a PostgreSQL database instance with migrations applied using a Docker script. This is a common setup step for backend development. ```bash ./scripts/init_db.sh ``` -------------------------------- ### Install Cargo Binutils and LLVM Tools (Windows) Source: https://github.com/lukemathwalker/zero-to-production/blob/main/README.md Installs cargo-binutils and the LLVM tools preview component on Windows. These are required for certain Rust backend development tasks. ```bash cargo install -f cargo-binutils rustup component add llvm-tools-preview ``` -------------------------------- ### Install SQLx CLI (Windows, Linux, macOS) Source: https://github.com/lukemathwalker/zero-to-production/blob/main/README.md Installs the SQLx CLI version ~0.7 with specific features for Rust backend development. This tool is used for compile-time checked SQL queries. ```bash cargo install --version="~0.7" sqlx-cli --no-default-features --features rustls,postgres ``` -------------------------------- ### Install ZLD Linker (macOS) Source: https://github.com/lukemathwalker/zero-to-production/blob/main/README.md Installs the ZLD linker on macOS using Homebrew. This is a faster alternative linker often used in Rust development. ```bash brew install michaeleisel/zld/zld ``` -------------------------------- ### Run Project with Cargo Source: https://github.com/lukemathwalker/zero-to-production/blob/main/README.md Starts the Rust web server. Access the application via a web browser at http://127.0.0.1:8000/login. A default admin account is provided. ```bash cargo run ``` -------------------------------- ### Initialize Redis with Docker Source: https://github.com/lukemathwalker/zero-to-production/blob/main/README.md Launches a Redis instance using a Docker script. Redis is often used for caching or message queuing in backend applications. ```bash ./scripts/init_redis.sh ``` -------------------------------- ### Build Project with Cargo Source: https://github.com/lukemathwalker/zero-to-production/blob/main/README.md Compiles the Rust project using Cargo, the Rust build system and package manager. This command builds the executable for the application. ```bash cargo build ``` -------------------------------- ### Run Tests with Cargo Source: https://github.com/lukemathwalker/zero-to-production/blob/main/README.md Executes all tests defined in the Rust project using Cargo. This command requires the database and Redis instances to be running. ```bash cargo test ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.