simd-json 0.13.11

High performance JSON parser based on a port of simdjson
Documentation
[package]
name = "simd-json"
version = "0.13.11"
authors = ["Heinz N. Gies <heinz@licenser.net>", "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"] }

lexical-core = { version = "1", features = ["format"] }
beef = { version = "0.5", optional = true }
halfbrown = "0.2"
value-trait = { version = "0.8" }
# 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.9"
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 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"]

# 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
panic = "abort"


[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)',
] }