#cargo #metadata #struct #toml #serde

cargo_toml

Cargo.toml struct definitions for parsing with Serde

23 unstable releases (5 breaking)

Uses new Rust 2021

0.13.0 Oct 14, 2022
0.12.4 Oct 2, 2022
0.11.5 Mar 23, 2022
0.10.3 Dec 28, 2021
0.3.0 Jun 16, 2018

#19 in Parser implementations

Download history 30557/week @ 2022-08-15 28437/week @ 2022-08-22 28625/week @ 2022-08-29 45487/week @ 2022-09-05 28051/week @ 2022-09-12 31645/week @ 2022-09-19 44281/week @ 2022-09-26 35758/week @ 2022-10-03 34358/week @ 2022-10-10 33900/week @ 2022-10-17 32665/week @ 2022-10-24 31348/week @ 2022-10-31 43567/week @ 2022-11-07 46610/week @ 2022-11-14 33641/week @ 2022-11-21 32957/week @ 2022-11-28

159,436 downloads per month
Used in 165 crates (103 directly)

Apache-2.0 OR MIT

61KB
1.5K SLoC

Deserialize Cargo.toml

due to a milkshake duck situation, the preferred Tom for this format has been replaced

This is a definition of fields in Cargo.toml files for serde. It allows reading of Cargo.toml data, and serializing it using TOML or other formats. It's used by the lib.rs site to extract information about crates.

To get started, see Manifest::from_slice.

Additionally, this crate supports basic post-processing of the data to emulate Cargo's autobins feature, which sets manifest defaults based on presence of files on disk (other non-disk data sources are also supported).


lib.rs:

This crate defines structs that can be deserialized with Serde to load and inspect Cargo.toml metadata.

See Manifest::from_slice.

Dependencies

~0.5–1.1MB
~26K SLoC