| name | cargo-workflow |
| description | Use when building, running, linting with clippy, formatting with rustfmt, or running cargo commands for the rs-summarizer project. |
Cargo Workflow
Overview
Standard development commands for building, testing, linting, and running rs-summarizer.
Quick Reference
cargo build
cargo build --release
export GEMINI_API_KEY=$(cat ~/api_key.txt)
cargo run --release
cargo clippy -- -W clippy::all
cargo fmt
cargo fmt -- --check
cargo check
Testing Commands
cargo test
cargo test utils::url_validator
cargo test services::embedding
cargo test cache
GEMINI_API_KEY=$(cat ~/api_key.txt) cargo test --test integration_pipeline -- --ignored
cargo test --test integration_transcript -- --ignored
cargo test --test integration_browser -- --ignored
GEMINI_API_KEY=$(cat ~/api_key.txt) cargo test -- --include-ignored
cargo test -- --nocapture
Dependency Management
cargo update --dry-run --verbose
cargo update
cargo search <crate-name>
Build Notes
- The project uses
sqlx with compile-time query checking. If you get sqlx errors, ensure the database exists or use SQLX_OFFLINE=true.
- Askama templates are checked at compile time. Template syntax errors show as compile errors.
- The
static/ directory must be present at runtime (relative to CWD) for tower_http::ServeDir.
Environment Variables
| Variable | Required | Purpose |
|---|
GEMINI_API_KEY | Yes (for API calls) | Google Gemini API authentication |
RUST_LOG | No | Tracing log level (e.g., info, debug) |
Relevant Files
Cargo.toml — Dependencies and project metadata
Cargo.lock — Locked dependency versions
src/main.rs — Entry point (server on port 5001)
src/lib.rs — Library crate (used by integration tests)