35 releases (9 breaking)
new 0.20.0 | Apr 19, 2024 |
---|---|
0.19.2 | Mar 4, 2024 |
0.19.1 | Jan 29, 2024 |
0.18.0-beta.2 | Dec 22, 2023 |
0.3.0 |
|
#30 in Parser implementations
396,430 downloads per month
Used in 317 crates
(153 directly)
115KB
2K
SLoC
Deserialize Cargo.toml
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.
This crate is more than just schema definition. It supports post-processing of the data to emulate Cargo's workspace inheritance and autobins
features. It supports files on disk as well as other non-disk data sources.
To get started, see Manifest::from_slice
. If you need to get information about Cargo projects local to devs' machines, also consider cargo_metadata.
lib.rs
:
This crate defines struct
s that can be deserialized with Serde
to load and inspect Cargo.toml
metadata.
See Manifest::from_slice
.
Correct interpretation of the manifest requires two things:
- List of files in order to auto-discover binaries, examples, benchmarks, and tests.
- Potentially
Manifest
from parent directories that acts as a workspace root for inheritance of shared workspace information.
The crate has methods for processing this information, but you will need to write some glue code to obtain it. See Manifest::complete_from_path_and_workspace
.
Dependencies
~0.6–1.2MB
~27K SLoC