SIMD Json for Rust   ![Build Status] ![Windows Build Status] ![Latest Version]

Rust port of extremely fast simdjson JSON parser with serde compatibility.


readme (for real!)

CPU target

For taking advantage of simdjson your system needs to be SIMD compatible. This means to compile with native cpu support and the given features. Look at The cargo config in this repository to get an example.

jemalloc

If you are writing perormance centric code, make sure to use jemalloc and not the system allocator (that has now become default in rust), it gives an very noticable boost imperformance.

serde

simd-json.rs is compatible with serde and serde-json. The Value types provided implement serializers and deserialisers. In addition to that simd-json.rs implements the Deserializer for the parser so it can deserialize anything that implements the serde Deserialize trait.

That said serde is contained in the serde_impl feature which is part of the default feature set, but it can be disabled.

serializing

sims-json.rs does not provide capabiltiy to serialize JSON data, serde-json does a good job at this and there would be very little won by re-implementing it.

unsafe

simd-json.rs uses a lot of unsafe code first of all since all SIMD-intrinsics are inherently unsafe and also to work around some bottlenecks safe rust code. So this requires extra scrutiny and do to this diligently testing takes 5 shapes:

This sure doens't ensure complete safetly but it does go a long way.

Other interesting things

There are also bindings for simdjson available here

License

simdjson-rs itself is licensed under either of

However it ports a lot of code from simdjson so their work and copyright on that should be respected along side.

The serde integration is based on their example and serde-json so again, their copyright should as well be respected.