Cargo.toml is the manifest at a Rust project’s root. It records package configuration such as dependencies, workspace membership, and binary targets, connecting project structure to Cargo commands. section 4.1 section 3.1.1
Use Cargo.toml to configure:
- A workspace and its member projects, such as tutor-nodb and tutor-db. section 4.1 section 3.1.1
- Runtime, web, database, serialization, and utility dependencies with versions and feature flags. section 4.2.2 section 8.1
- Named binary targets, including basic-server for an executable under src/bin. section 3.1.1
Database-backed service manifest
A tutor-db Cargo.toml can combine Actix Web, dotenv, sqlx with PostgreSQL and Tokio features, Serde, Chrono, and vendored OpenSSL. Cargo then runs the configured project with commands such as cargo run --bin iter1 -p tutordb. section 4.2.2
[dependencies]
#Actix web framework and run-time #1
actix-web = "4.1.0"
actix-rt = "2.7.0"
#Environment variable access libraries
dotenv = "0.15.0" #2
#Postgres access library
sqlx = {version = "0.6.2", default_features = false, features =
["postgres","runtime-tokio-native-tls", "macros","chrono"]} #3
# Data serialization library
serde = { version = "1.0.144", features = ["derive"] } #4
# Other utils
chrono = {version = "0.4.22", features = ["serde"]} #5
# Openssl for build (if openssl is not already installed on the dev server)
openssl = { version = "0.10.41", features = ["vendored"] } #6
Inspect a complete dependency section showing versions, comments, default-feature control, and sqlx feature selection. section 4.2.2



