[workspace]
resolver = "2"
members = [
"macros",
"marser-trace-schema",
"marser-trace-viewer",
]
[package]
name = "marser"
version = "0.2.2"
edition = "2024"
autobenches = false
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",
".tokeignore",
]
[package.metadata.docs.rs]
features = ["parser-trace", "annotate-snippets", "embed-guide"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[profile.bench]
inherits = "release"
debug = false
lto = true
codegen-units = 1
[profile.profiling]
inherits = "release"
debug = true
lto = false
[features]
default = ["std"]
std = []
annotate-snippets = ["dep:annotate-snippets"]
parser-trace = ["std", "dep:serde", "dep:serde_json", "dep:marser-trace-schema"]
json-testsuite = []
embed-guide = []
[dependencies]
hashbrown = { version = "0.15", default-features = false, features = ["alloc", "default-hasher"] }
annotate-snippets = { version = "0.12.15", default-features = false, optional = true }
marser_macros = { version = "0.1.1", path = "macros" }
marser-trace-schema = { version = "0.1.0", path = "marser-trace-schema", optional = true }
serde = { version = "1", default-features = false, features = ["derive", "alloc"], optional = true }
serde_json = { version = "1", default-features = false, features = ["alloc"], optional = true }
[dev-dependencies]
criterion = "0.5"
trybuild = "1.0.105"
[[bench]]
name = "json_parse"
harness = false
path = "benches/json_parse.rs"
[[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 = "profiling"