O'Reilly logo

Mastering Rust by Vesa Kaihlavirta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Cargo.toml - project metadata

Let's take a closer look at what Cargo.toml may contain. As you saw earlier, cargo init creates an almost empty Cargo.toml filled with just the most necessary fields so that a project can be built.

To see what Cargo.toml supports, here's an imagined Cargo.toml from a larger application:

# cargo-example/Cargo.toml [package] name = "cargo-metadata-example" version = "1.2.3" description = "An example of Cargo metadata" license = "MIT" readme = "README.md" keywords = ["example", "cargo", "mastering"] authors = ["Jack Daniels <jack@danie.ls>", "Iddie Ezzard <iddie@ezzy>"] build = "build.rs" [package.metadata.settings] default-data-path = "/var/lib/example" [features] default=["mysql"] [build-dependencies] syntex ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required