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