| Crates.io | manifest_parser_rs |
| lib.rs | manifest_parser_rs |
| version | 0.2.0 |
| created_at | 2024-11-13 00:15:11.5882+00 |
| updated_at | 2024-11-13 00:15:11.5882+00 |
| description | A Cargo.toml manifest file parser that supports sections and key-value pairs |
| homepage | |
| repository | https://github.com/Official-Echo/manifest_parser_rs |
| max_upload_size | |
| id | 1445718 |
| size | 44,657 |
The manifest_parser_rs is a Rust library designed to parse Cargo.toml manifest files.
The grammar for manifest_parser_rs is defined using Pest, capturing various components essential for accurately interpreting Cargo manifest files. This includes special handling of dependencies and version specifications, with rigorous validation to ensure versions follow SemVer compliance. The main components of the grammar are as follows:
[dependencies], [dev-dependencies], [package], and more specialized sections like [features] and [profile].key = value, with support for various value types (e.g., strings, numbers, and special characters).# and are ignored by the parser.[dependencies] and [dev-dependencies] sections. Each dependency entry may specify:
version: With enforced SemVer compliance, versions are checked to ensure they adhere to Semantic Versioning 2.0 (e.g., 1.2.3, 1.2.3-beta.1).git: A git repository URL as a source.path: A file path to the local dependency.registry: A specified registry for the dependency.workspace and optional flags, along with specific features.-beta, -rc.1) and build metadata (e.g., +build.5).[dependencies], [package], etc.) and custom sections specified in the grammar.This structured approach ensures that the parser can handle complex manifest structures while maintaining strict versioning and dependency requirements as outlined by Cargo and SemVer.
[package]
name = "manifest_parser_rs"
version = "0.2.0"
edition = "2021"
description = "A Cargo.toml manifest file parser that supports sections and key-value pairs"
authors = ["Official-Echo <official-echo@github.com>"]
license = "MIT"
repository = "https://github.com/Official-Echo/manifest_parser_rs"
#documentation = "https://docs.rs/manifest_parser_rs"
readme = "README.md"
keywords = ["manifest", "parser", "ini", "configuration", "settings"]
categories = ["parsing", "manifest"]
[dependencies]
anyhow = "1.0.93"
clap = { version = "4.5.20", features = ["derive"] }
pest = "2.7.14"
pest_derive = "2.7.14"
thiserror = "2.0.3"
[lib]
name = "manifest_parser_rs"
path = "src/lib.rs"
[[bin]]
name = "manifest_parser_rs"
path = "src/main.rs"
|||
|||
|||
|||
|||
|||
|||
\ ||| /
\\|//
\|/
v
Hashmap of
├─ package
│ ├─ name "manifest_parser_rs"
│ ├─ version "0.2.0"
│ ├─ edition "2021"
│ ├─ description "A Cargo.toml manifest file parser..."
│ ├─ authors ["Official-Echo <official-echo@github.com>"]
│ ├─ license "MIT"
│ ├─ repository "https://github.com/Official-Echo/manifest_parser_rs"
│ ├─ readme "README.md"
│ ├─ keywords ["manifest", "parser", "ini", "configuration", "settings"]
│ └─ categories ["parsing", "manifest"]
│
├─ dependencies
│ ├─ anyhow "1.0.93"
│ ├─ clap { version = "4.5.20", features = ["derive"] }
│ ├─ pest "2.7.14"
│ ├─ pest_derive "2.7.14"
│ └─ thiserror "2.0.3"
│
├─ lib
│ ├─ name "manifest_parser_rs"
│ └─ path "src/lib.rs"
│
└─ bin
├─ name "manifest_parser_rs"
└─ path "src/main.rs"