| 1 |
[workspace] |
| 2 |
resolver = "2" |
| 3 |
members = ["fuzz"] |
| 4 |
|
| 5 |
[workspace.package] |
| 6 |
repository = "https://github.com/winnow-rs/winnow" |
| 7 |
license = "MIT" |
| 8 |
edition = "2021" |
| 9 |
rust-version = "1.65.0" # MSRV |
| 10 |
include = [ |
| 11 |
"build.rs", |
| 12 |
"src/**/*", |
| 13 |
"Cargo.toml", |
| 14 |
"Cargo.lock", |
| 15 |
"LICENSE*", |
| 16 |
"README.md", |
| 17 |
"examples/**/*" |
| 18 |
] |
| 19 |
|
| 20 |
[workspace.lints.rust] |
| 21 |
rust_2018_idioms = { level = "warn", priority = -1 } |
| 22 |
unnameable_types = "warn" |
| 23 |
unreachable_pub = "warn" |
| 24 |
unsafe_op_in_unsafe_fn = "warn" |
| 25 |
unused_lifetimes = "warn" |
| 26 |
unused_macro_rules = "warn" |
| 27 |
|
| 28 |
[workspace.lints.clippy] |
| 29 |
bool_assert_comparison = "allow" |
| 30 |
branches_sharing_code = "allow" |
| 31 |
checked_conversions = "warn" |
| 32 |
collapsible_else_if = "allow" |
| 33 |
create_dir = "warn" |
| 34 |
dbg_macro = "warn" |
| 35 |
debug_assert_with_mut_call = "warn" |
| 36 |
doc_markdown = "warn" |
| 37 |
empty_enum = "warn" |
| 38 |
enum_glob_use = "warn" |
| 39 |
expl_impl_clone_on_copy = "warn" |
| 40 |
explicit_deref_methods = "warn" |
| 41 |
explicit_into_iter_loop = "warn" |
| 42 |
fallible_impl_from = "warn" |
| 43 |
filter_map_next = "warn" |
| 44 |
flat_map_option = "warn" |
| 45 |
float_cmp_const = "warn" |
| 46 |
fn_params_excessive_bools = "warn" |
| 47 |
from_iter_instead_of_collect = "warn" |
| 48 |
if_same_then_else = "allow" |
| 49 |
implicit_clone = "warn" |
| 50 |
imprecise_flops = "warn" |
| 51 |
inconsistent_struct_constructor = "warn" |
| 52 |
inefficient_to_string = "warn" |
| 53 |
infinite_loop = "warn" |
| 54 |
invalid_upcast_comparisons = "warn" |
| 55 |
large_digit_groups = "warn" |
| 56 |
large_stack_arrays = "warn" |
| 57 |
large_types_passed_by_value = "warn" |
| 58 |
let_and_return = "allow" # sometimes good to name what you are returning |
| 59 |
linkedlist = "warn" |
| 60 |
lossy_float_literal = "warn" |
| 61 |
macro_use_imports = "warn" |
| 62 |
mem_forget = "warn" |
| 63 |
mutex_integer = "warn" |
| 64 |
needless_continue = "allow" |
| 65 |
needless_for_each = "warn" |
| 66 |
negative_feature_names = "warn" |
| 67 |
path_buf_push_overwrite = "warn" |
| 68 |
ptr_as_ptr = "warn" |
| 69 |
rc_mutex = "warn" |
| 70 |
redundant_feature_names = "warn" |
| 71 |
ref_option_ref = "warn" |
| 72 |
rest_pat_in_fully_bound_structs = "warn" |
| 73 |
result_large_err = "allow" |
| 74 |
same_functions_in_if_condition = "warn" |
| 75 |
# self_named_module_files = "warn" # false-positives |
| 76 |
semicolon_if_nothing_returned = "warn" |
| 77 |
str_to_string = "warn" |
| 78 |
string_add = "warn" |
| 79 |
string_add_assign = "warn" |
| 80 |
string_lit_as_bytes = "warn" |
| 81 |
string_to_string = "warn" |
| 82 |
todo = "warn" |
| 83 |
trait_duplication_in_bounds = "warn" |
| 84 |
uninlined_format_args = "warn" |
| 85 |
verbose_file_reads = "warn" |
| 86 |
wildcard_imports = "allow" |
| 87 |
zero_sized_map_values = "warn" |
| 88 |
|
| 89 |
[profile.dev] |
| 90 |
panic = "abort" |
| 91 |
|
| 92 |
[profile.release] |
| 93 |
panic = "abort" |
| 94 |
codegen-units = 1 |
| 95 |
lto = true |
| 96 |
# debug = "line-tables-only" # requires Cargo 1.71 |
| 97 |
|
| 98 |
[package] |
| 99 |
name = "winnow" |
| 100 |
version = "0.7.14" |
| 101 |
description = "A byte-oriented, zero-copy, parser combinators library" |
| 102 |
categories = ["parsing"] |
| 103 |
keywords = ["parser", "parser-combinators", "parsing", "streaming", "bit"] |
| 104 |
autoexamples = false |
| 105 |
repository.workspace = true |
| 106 |
license.workspace = true |
| 107 |
edition.workspace = true |
| 108 |
rust-version.workspace = true |
| 109 |
include.workspace = true |
| 110 |
|
| 111 |
[package.metadata.docs.rs] |
| 112 |
features = ["unstable-doc"] |
| 113 |
rustdoc-args = ["--generate-link-to-definition"] |
| 114 |
|
| 115 |
[package.metadata.release] |
| 116 |
pre-release-replacements = [ |
| 117 |
{file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1}, |
| 118 |
{file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, |
| 119 |
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, |
| 120 |
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1}, |
| 121 |
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/winnow-rs/winnow/compare/{{tag_name}}...HEAD", exactly=1}, |
| 122 |
{file="src/lib.rs", search="blob/v.+\\..+\\..+/CHANGELOG.md", replace="blob/v{{version}}/CHANGELOG.md", exactly=1}, |
| 123 |
] |
| 124 |
|
| 125 |
[features] |
| 126 |
default = ["std"] |
| 127 |
alloc = [] |
| 128 |
std = ["alloc", "memchr?/std"] |
| 129 |
simd = ["dep:memchr"] |
| 130 |
debug = ["std", "dep:anstream", "dep:anstyle", "dep:is_terminal_polyfill", "dep:terminal_size"] |
| 131 |
unstable-recover = [] |
| 132 |
|
| 133 |
unstable-doc = ["alloc", "std", "simd", "unstable-recover"] |
| 134 |
|
| 135 |
[dependencies] |
| 136 |
anstream = { version = "0.6.15", optional = true } |
| 137 |
anstyle = { version = "1.0.8", optional = true } |
| 138 |
is_terminal_polyfill = { version = "1.48.1", optional = true } |
| 139 |
memchr = { version = "2.7", optional = true, default-features = false } |
| 140 |
terminal_size = { version = "0.4.3", optional = true } |
| 141 |
|
| 142 |
[dev-dependencies] |
| 143 |
proptest = "1.6.0" |
| 144 |
criterion = "0.5.1" |
| 145 |
lexopt = "0.3.1" |
| 146 |
term-transcript = "0.2.0" |
| 147 |
snapbox = { version = "0.6.21", features = ["examples"] } |
| 148 |
circular = "0.3.0" |
| 149 |
rustc-hash = "2.1.1" |
| 150 |
automod = "1.0.15" |
| 151 |
annotate-snippets = "0.11.4" |
| 152 |
anyhow = "1.0.100" |
| 153 |
|
| 154 |
[profile.bench] |
| 155 |
debug = true |
| 156 |
lto = true |
| 157 |
codegen-units = 1 |
| 158 |
|
| 159 |
[[example]] |
| 160 |
name = "arithmetic" |
| 161 |
test = true |
| 162 |
required-features = ["alloc"] |
| 163 |
|
| 164 |
[[example]] |
| 165 |
name = "c_expression" |
| 166 |
required-features = ["std"] |
| 167 |
|
| 168 |
[[example]] |
| 169 |
name = "css" |
| 170 |
test = true |
| 171 |
required-features = ["alloc"] |
| 172 |
|
| 173 |
[[example]] |
| 174 |
name = "custom_error" |
| 175 |
test = true |
| 176 |
required-features = ["alloc"] |
| 177 |
|
| 178 |
[[example]] |
| 179 |
name = "http" |
| 180 |
required-features = ["alloc"] |
| 181 |
|
| 182 |
[[example]] |
| 183 |
name = "ini" |
| 184 |
test = true |
| 185 |
required-features = ["std"] |
| 186 |
|
| 187 |
[[example]] |
| 188 |
name = "json" |
| 189 |
test = true |
| 190 |
required-features = ["std"] |
| 191 |
|
| 192 |
[[example]] |
| 193 |
name = "ndjson" |
| 194 |
test = true |
| 195 |
required-features = ["std"] |
| 196 |
|
| 197 |
[[example]] |
| 198 |
name = "json_iterator" |
| 199 |
required-features = ["std"] |
| 200 |
|
| 201 |
[[example]] |
| 202 |
name = "iterator" |
| 203 |
|
| 204 |
[[example]] |
| 205 |
name = "s_expression" |
| 206 |
required-features = ["alloc"] |
| 207 |
|
| 208 |
[[example]] |
| 209 |
name = "string" |
| 210 |
required-features = ["alloc"] |
| 211 |
|
| 212 |
[[bench]] |
| 213 |
name = "arithmetic" |
| 214 |
path = "examples/arithmetic/bench.rs" |
| 215 |
harness = false |
| 216 |
required-features = ["alloc"] |
| 217 |
|
| 218 |
[[bench]] |
| 219 |
name = "c_expression" |
| 220 |
path = "examples/c_expression/bench.rs" |
| 221 |
harness = false |
| 222 |
required-features = ["std"] |
| 223 |
|
| 224 |
[[bench]] |
| 225 |
name = "contains_token" |
| 226 |
harness = false |
| 227 |
|
| 228 |
[[bench]] |
| 229 |
name = "find_slice" |
| 230 |
harness = false |
| 231 |
|
| 232 |
[[bench]] |
| 233 |
name = "iter" |
| 234 |
harness = false |
| 235 |
|
| 236 |
[[bench]] |
| 237 |
name = "next_slice" |
| 238 |
harness = false |
| 239 |
|
| 240 |
[[bench]] |
| 241 |
name = "number" |
| 242 |
harness = false |
| 243 |
|
| 244 |
[[bench]] |
| 245 |
name = "http" |
| 246 |
path = "examples/http/bench.rs" |
| 247 |
harness = false |
| 248 |
required-features = ["alloc"] |
| 249 |
|
| 250 |
[[bench]] |
| 251 |
name = "ini" |
| 252 |
path = "examples/ini/bench.rs" |
| 253 |
harness = false |
| 254 |
required-features = ["std"] |
| 255 |
|
| 256 |
[[bench]] |
| 257 |
name = "json" |
| 258 |
path = "examples/json/bench.rs" |
| 259 |
harness = false |
| 260 |
required-features = ["std"] |
| 261 |
|
| 262 |
[lints] |
| 263 |
workspace = true |