Crates.io | cargo_toml |
lib.rs | cargo_toml |
version | |
source | src |
created_at | 2018-06-14 00:51:25.020558 |
updated_at | 2024-12-05 23:31:14.859476 |
description | `Cargo.toml` struct definitions for parsing with Serde |
homepage | https://lib.rs/cargo_toml |
repository | https://gitlab.com/lib.rs/cargo_toml |
max_upload_size | |
id | 70024 |
Cargo.toml error: | TOML parse error at line 25, column 1 | 25 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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.
Allows parsing Cargo.toml
independently of Cargo. It can read manifests that use nightly features, without requiring a nightly Cargo version. Unlike cargo metadata
, this is a standalone self-contained implementation, and it doesn't run any external commands.
It is safe to use with untrusted code. It is just a parser. It won't run any build commands nor apply any .cargo/config.toml
files.
It supports Cargo workspaces and inheritance of fields.
It supports abstracting the file system, so parsing of Cargo.toml
can auto-detect files parsed from .crate
tarballs, bare git repositories, and other data sources, without having to extract the files to disk first.
It has optional helper functions for interpreting the [features]
section.
Cargo regularly adds new features to Cargo.toml
. Keep this crate up-to-date to correctly parse them all — use dependabot or renovate.