forked from simd-lite/simd-json
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
154 lines (119 loc) · 3.78 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
[package]
name = "simd-json"
version = "0.14.0"
authors = ["Heinz N. Gies <[email protected]>", "Sunny Gleason"]
edition = "2021"
exclude = ["data/*", "fuzz/*"]
license = "Apache-2.0 OR MIT"
description = "High performance JSON parser based on a port of simdjson"
repository = "https://github.com/simd-lite/simd-json"
readme = "README.md"
documentation = "https://docs.rs/simd-json"
rust-version = "1.64"
[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }
[dependencies]
simdutf8 = { version = "0.1.4", features = ["public_imp", "aarch64_neon"] }
beef = { version = "0.5", optional = true }
halfbrown = "0.2"
value-trait = { version = "0.10.0" }
# ahash known key
once_cell = { version = "1.17", optional = true }
ahash = { version = "0.8", optional = true }
# serde compatibilty
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
# perf testing
alloc_counter = { version = "0.0.4", optional = true }
colored = { version = "2.0", optional = true }
getopts = { version = "0.2", optional = true }
jemallocator = { version = "0.5", optional = true }
perfcnt = { version = "0.8", optional = true }
ref-cast = "1.0"
[dev-dependencies]
float-cmp = "0.10"
getopts = "0.2"
core_affinity = { version = "0.8" }
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
criterion = { version = "0.5" }
proptest = "1.0"
[lib]
bench = false
[[bench]]
name = "parse"
harness = false
[[bench]]
name = "to_tape"
harness = false
[features]
default = ["swar-number-parsing", "serde_impl", "runtime-detection"]
arraybackend = ["halfbrown/arraybackend"]
# Forces the `owned::Value` and `borrowed::Value` to deduplicate duplicated keys by letting consecutive keys overwrite previous ones. This comes at a
# performance cost. By default duplicate keys will not be overwritten and feeding json objects with duplicated
# keys to either of the `Value`s will result in undefined behavior.
value-no-dup-keys = []
# Support for 128 bit integers
128bit = ["value-trait/128bit"]
# used for enabeling known keys in favour of a slower
# hasher that is not protected against hash collision
# attacks
known-key = ["once_cell", "ahash"]
# use 8 number at once parsing strategy
swar-number-parsing = []
# Uses an approximate float parsing algorithm that is faster
# but does not guarantee round trips for the edges
approx-number-parsing = []
# serde compatibility
serde_impl = ["serde", "serde_json", "halfbrown/serde"]
# for testing allocations
alloc = ["alloc_counter"]
# don't inline code - used for debugging
no-inline = []
# also bench serde in the benchmarks
bench-serde = ["serde_json"]
# use branch hints - requires nightly :(
hints = [] # requires nightly
# for perf testing, used by the example
perf = ["perfcnt", "getopts", "colored", "serde_json"]
# for documentation
docsrs = []
# portable simd support (as of rust 1.73 nightly only)
# portable = ["simdutf8/portable"]
# use runtime detection of the CPU features where possible instead of enforcing an instruction set
runtime-detection = ["value-trait/runtime-detection"]
#bench fetures
bench-all = [
"bench-apache_builds",
"bench-event_stacktrace_10kb",
"bench-github_events",
"bench-canada",
"bench-citm_catalog",
"bench-log",
"bench-twitter",
]
bench-apache_builds = []
bench-event_stacktrace_10kb = []
bench-github_events = []
bench-canada = []
bench-citm_catalog = []
bench-log = []
bench-twitter = []
big-int-as-float = []
[[example]]
name = "perf"
[profile.bench]
codegen-units = 1
lto = true
opt-level = 3
[profile.release]
codegen-units = 1
lto = true
opt-level = 3
panic = "abort"
[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = [
# Legacy code
'cfg(portable)',
# Tool specific configurations
'cfg(tarpaulin_include)',
] }