forked from simd-lite/simd-json
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
106 lines (80 loc) · 2.76 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
[package]
name = "simd-json"
version = "0.7.0"
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.59"
[dependencies]
lexical-core = { version = "0.8", features = ["format"] }
beef = { version = "0.5", optional = true }
halfbrown = "0.1"
value-trait = { version = "0.5.1" }
simdutf8 = { version = "0.1.4", features = ["public_imp", "aarch64_neon"] }
# 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 }
[dev-dependencies]
float-cmp = "0.9"
getopts = "0.2"
criterion = { version = "0.4" }
core_affinity = { version = "0.8" }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
proptest = "1.0"
[lib]
bench = false
[[bench]]
name = "parse"
harness = false
[features]
default = ["swar-number-parsing", "serde_impl"]
# 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"]
key-to-lowercase = []
# used for enabeling known keys in favour of a slower
# hasher that is not protected against hash collision
# attacks
known-key = ["halfbrown/fxhash"]
# use 8 number at once parsing strategy
swar-number-parsing = []
# Uses a 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"]
# Allow fallback to non simd CPUs
allow-non-simd = []
# for testing allocations
alloc = ["alloc_counter"]
# don't inline code - used for debugging
no-inline = []
# uses safe slice access ([]) instead of get_unsafe
# **for debugging**
safe = []
# 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"]
[[example]]
name = "perf"
[profile.bench]
lto = "thin"
[profile.release]
lto = "thin"