nosj 0.3.2-aarch64-linux → 0.4.0-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +17 -0
- data/lib/nosj/3.3/nosj.so +0 -0
- data/lib/nosj/3.4/nosj.so +0 -0
- data/lib/nosj/4.0/nosj.so +0 -0
- data/lib/nosj/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd883bdfebc07e316c4baa1706cd9ba6b8036645a8cbd0b8b9b5a888c3a0e3c5
|
|
4
|
+
data.tar.gz: f73808429bfdf03043716ceb4b3d01a3536a4b6d2f1c092f15b54dff52ef9c82
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7dab8b234f37fa22a4ab1a5f0bfb906df9ecb6d85ecba50f63e5634d309387ea0ce4302eda8e2280d182ae69d0067ee852d4b23773d1c1c4164c1b6ed708cadf
|
|
7
|
+
data.tar.gz: '0909f76cdcd4d49f015ee951d14f785312d91e6cc6ff61c18be8fe5c091f068c546f7a5f2d5a41cbce0db75de9fd4c20ddfbcca249906997f2c7a09fc8380f96'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [0.4.0] - 2026-09-05
|
|
2
|
+
|
|
3
|
+
- Ractors: on Ruby 4.0+, `NOSJ.parse`, `NOSJ.generate`, and every
|
|
4
|
+
other entry point (lazy documents, partial parsing, the file APIs,
|
|
5
|
+
NDJSON, patches, reformatting, statistics) can be called from inside
|
|
6
|
+
a Ractor. Before this release each of them raised
|
|
7
|
+
`Ractor::UnsafeError` outside the main Ractor. Values parsed with
|
|
8
|
+
`freeze: true` are Ractor-shareable, so a document parsed in one
|
|
9
|
+
Ractor can be handed to another without copying.
|
|
10
|
+
- Updated Rust dependencies.
|
|
11
|
+
|
|
1
12
|
## [0.3.2] - 2026-07-19
|
|
2
13
|
|
|
3
14
|
- **IMPORTANT**—Fixed: the precompiled platform gems linked `libruby`
|
data/README.md
CHANGED
|
@@ -16,6 +16,7 @@ faster than Yajl—[see Benchmarks](#benchmarks).
|
|
|
16
16
|
- It does **byte-splicing edits**: `NOSJ.splice` changes a field inside a passing payload 10–51× faster than parse-mutate-generate, and RFC 6902 JSON Patch / RFC 7386 merge patch apply straight to the raw string.
|
|
17
17
|
- It is **great to debug with**: parse errors carry line, column, and a caret snippet pointing at the break, and `NOSJ.stats` X-rays a mystery blob (depth, value counts, key histogram) faster than parsing it.
|
|
18
18
|
- It accelerates a **Rails** application in both encoding and decoding.
|
|
19
|
+
- It is **Ractor-safe**: call it from any Ractor on Ruby 4.0+, and parse with `freeze: true` to get shareable results.
|
|
19
20
|
- It comes **precompiled** (platform gems built with per-platform optimizations,
|
|
20
21
|
nothing to compile on install).
|
|
21
22
|
- Otherwise, same API and option names as gem json.
|
|
@@ -300,6 +301,22 @@ NOSJ.parse(%({\n "a": 1,\n "b": }))
|
|
|
300
301
|
# ^
|
|
301
302
|
```
|
|
302
303
|
|
|
304
|
+
### Ractors
|
|
305
|
+
|
|
306
|
+
On Ruby 4.0+, every entry point works inside a Ractor: parse and
|
|
307
|
+
generate, lazy documents, partial parsing, the file APIs, NDJSON,
|
|
308
|
+
patches, reformatting, and statistics.
|
|
309
|
+
|
|
310
|
+
```ruby
|
|
311
|
+
workers = Array.new(4) do
|
|
312
|
+
Ractor.new(payload) { |src| NOSJ.parse(src, freeze: true) }
|
|
313
|
+
end
|
|
314
|
+
workers.map(&:value)
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
`freeze: true` returns deeply frozen, Ractor-shareable values, so a
|
|
318
|
+
document parsed in one Ractor can be handed to another without a copy.
|
|
319
|
+
|
|
303
320
|
## Benchmarks
|
|
304
321
|
|
|
305
322
|
Every installed JSON gem, benchmark-ips: AWS EC2 c7a.2xlarge (AMD EPYC 9R14, Zen 4), Ruby 4.0.6 + YJIT, json 2.21.1, Oj 3.17.4, RapidJSON 0.4.0, FastJsonparser 0.6.0, Yajl 1.4.3, PGO build, 2026-07-16. `×N` = times slower than nosj.
|
data/lib/nosj/3.3/nosj.so
CHANGED
|
Binary file
|
data/lib/nosj/3.4/nosj.so
CHANGED
|
Binary file
|
data/lib/nosj/4.0/nosj.so
CHANGED
|
Binary file
|
data/lib/nosj/version.rb
CHANGED