1[workspace]
2resolver = "2"
3members = ["fuzz"]
4
5[workspace.package]
6license = "MIT"
7edition = "2021"
8rust-version = "1.64.0" # MSRV
9include = [
10 "build.rs",
11 "src/**/*",
12 "Cargo.toml",
13 "Cargo.lock",
14 "LICENSE*",
15 "README.md",
16 "benches/**/*",
17 "examples/**/*"
18]
19
20[package]
21name = "winnow"
22version = "0.6.5"
23description = "A byte-oriented, zero-copy, parser combinators library"
24repository = "https://github.com/winnow-rs/winnow"
25categories = ["parsing"]
26keywords = ["parser", "parser-combinators", "parsing", "streaming", "bit"]
27autoexamples = false
28license.workspace = true
29edition.workspace = true
30rust-version.workspace = true
31include.workspace = true
32
33[package.metadata.docs.rs]
34features = ["unstable-doc"]
35rustdoc-args = ["--cfg", "docsrs"]
36cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
37
38[package.metadata.release]
39pre-release-replacements = [
40 {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1},
41 {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1},
42 {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
43 {file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
44 {file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/winnow-rs/winnow/compare/{{tag_name}}...HEAD", exactly=1},
45 {file="src/lib.rs", search="blob/v.+\\..+\\..+/CHANGELOG.md", replace="blob/v{{version}}/CHANGELOG.md", exactly=1},
46]
47
48[features]
49default = ["std"]
50alloc = []
51std = ["alloc", "memchr?/std"]
52simd = ["dep:memchr"]
53debug = ["dep:anstream", "dep:anstyle", "dep:is-terminal", "dep:terminal_size"]
54unstable-recover = []
55
56unstable-doc = ["alloc", "std", "simd", "unstable-recover"]
57
58[dependencies]
59anstream = { version = "0.3.2", optional = true }
60anstyle = { version = "1.0.1", optional = true }
61is-terminal = { version = "0.4.9", optional = true }
62memchr = { version = "2.5", optional = true, default-features = false }
63terminal_size = { version = "0.2.6", optional = true }
64
65[dev-dependencies]
66doc-comment = "0.3"
67proptest = "1.2.0"
68criterion = "0.5.1"
69lexopt = "0.3.0"
70term-transcript = "0.2.0"
71escargot = "0.5.7"
72snapbox = { version = "0.4.11", features = ["examples"] }
73circular = "0.3.0"
74rustc-hash = "1.1.0"
75
76[profile.bench]
77debug = true
78lto = true
79codegen-units = 1
80
81[[example]]
82name = "arithmetic"
83test = true
84required-features = ["alloc"]
85
86[[example]]
87name = "css"
88test = true
89required-features = ["alloc"]
90
91[[example]]
92name = "custom_error"
93test = true
94required-features = ["alloc"]
95
96[[example]]
97name = "http"
98required-features = ["alloc"]
99
100[[example]]
101name = "ini"
102test = true
103required-features = ["std"]
104
105[[example]]
106name = "json"
107test = true
108required-features = ["std"]
109
110[[example]]
111name = "ndjson"
112test = true
113required-features = ["std"]
114
115[[example]]
116name = "json_iterator"
117required-features = ["std"]
118
119[[example]]
120name = "iterator"
121
122[[example]]
123name = "s_expression"
124required-features = ["alloc"]
125
126[[example]]
127name = "string"
128required-features = ["alloc"]
129
130[[bench]]
131name = "arithmetic"
132path = "examples/arithmetic/bench.rs"
133harness = false
134required-features = ["alloc"]
135
136[[bench]]
137name = "contains_token"
138harness = false
139
140[[bench]]
141name = "find_slice"
142harness = false
143
144[[bench]]
145name = "iter"
146harness = false
147
148[[bench]]
149name = "next_slice"
150harness = false
151
152[[bench]]
153name = "number"
154harness = false
155
156[[bench]]
157name = "http"
158path = "examples/http/bench.rs"
159harness = false
160required-features = ["alloc"]
161
162[[bench]]
163name = "ini"
164path = "examples/ini/bench.rs"
165harness = false
166required-features = ["std"]
167
168[[bench]]
169name = "json"
170path = "examples/json/bench.rs"
171harness = false
172required-features = ["std"]
173