marser 0.1.2

Parser combinator toolkit with matcher-level backtracking and rich error reporting.
Documentation
[workspace]
resolver = "2"
members = [
    "macros",
    "marser-trace-schema",
    "marser-trace-viewer",
]

[package]
name = "marser"
version = "0.1.2"
edition = "2024"
autobenches = false # explicit `[[bench]]` only; `benches/json_parse_shared.rs` is not a crate root
authors = ["Arne de Borman"]
description = "Parser combinator toolkit with matcher-level backtracking and rich error reporting."
license = "MIT"
repository = "https://github.com/ArneCode/marser"
homepage = "https://github.com/ArneCode/marser"
documentation = "https://docs.rs/marser"
readme = "README.md"
keywords = ["parser", "combinator", "grammar", "peg", "parsing"]
categories = ["parsing"]
rust-version = "1.88"
exclude = [
    "target/**",
    "tests/JSONTestSuite",
    "macros/**",
    "marser-trace-schema/**",
    "marser-trace-viewer/**",
    ".vscode/**",
    ".gitmodules",
    "scripts/**",
    ".tokeignore",
    "src/bin/profile_json_parse.rs",
]

# docs.rs: build with tracing + erased so public API behind features is documented.
[package.metadata.docs.rs]
features = ["parser-trace", "annotate-snippets", "embed-guide"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]

# Readable stacks in `cargo flamegraph --bench …` / perf (line-level is still limited without LTO off).
[profile.bench]
debug = true

[features]
default = []
# Terminal diagnostics via annotate-snippets (`ParserError::eprint`, etc.).
annotate-snippets = ["dep:annotate-snippets"]
# Enable parser event tracing APIs and instrumentation.
parser-trace = ["dep:serde", "dep:serde_json", "dep:marser-trace-schema"]
# Enable JSONTestSuite integration tests (`tests/json_testsuite.rs`).
json-testsuite = []
# Embed long-form guide markdown into rustdoc (`marser::guide::*`). Off by default for faster `cargo build`.
embed-guide = []

[dependencies]
annotate-snippets = { version = "0.12.15", optional = true }
marser_macros = { version = "0.1.0", path = "macros" }
marser-trace-schema = { version = "0.1.0", path = "marser-trace-schema", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }

[dev-dependencies]
criterion = "0.5"
trybuild = "1.0.105"

[[bench]]
name = "json_parse"
harness = false
path = "benches/json_parse.rs"

[[bin]]
name = "profile_json_parse"
path = "src/bin/profile_json_parse.rs"
# Omitted from crates.io tarball via `exclude` below (local `cargo run --bin profile_json_parse` still works).

[[example]]
name = "json"
required-features = ["annotate-snippets"]
doc-scrape-examples = true

[[example]]
name = "mini_language"
required-features = ["annotate-snippets"]
doc-scrape-examples = true

[profile.samply]
inherits = "release"
debug = true