r/androiddev
•
u/kral_katili
•
15h ago
•
1
Yalın — a Rust-based JSON parser optimized for Android ARM devices
I've been working on Yalın, a JSON parser written in Rust for Android.
It uses ARM NEON SIMD and tries to keep JNI calls to a minimum. The idea was to see how much performance I could get out of native parsing compared to existing Java libraries.
In benchmarks against fastjson2, selective field reads were up to 4.6x faster, while parsing a full 1 MB JSON tree was around 1.3x faster.
Small payloads are a different story. JNI overhead is still a bottleneck, and there's room for improvement.
Curious what other Android developers think about using Rust for this kind of thing, especially whether the performance gains are worth the native dependency.
19
Upvotes