# sample-cargo.toml: the manifest of a fictional Rust crate. # Free sample from 99helpers.com/file-types/toml # In a real project this file must be named Cargo.toml (capital C). # 1. The package itself [package] name = "example-weather" version = "0.3.0" edition = "2021" description = "A fictional crate used as a TOML sample." license = "MIT OR Apache-2.0" authors = ["Ada Example "] # 2. Dependencies: a plain version string, or an inline table for more detail [dependencies] serde = { version = "1", features = ["derive"] } ureq = "2" chrono = { version = "0.4", default-features = false, features = ["clock"] } # 3. Only needed to compile and run tests [dev-dependencies] assert_cmd = "2" # 4. Optional features users can switch on: cargo build --features cli [features] default = [] cli = [] # 5. An array of tables: each [[bin]] declares one executable [[bin]] name = "weather" path = "src/main.rs" required-features = ["cli"] # 6. Build profiles: settings for cargo build --release [profile.release] opt-level = 3 lto = true