Skip to content

Releases

Palim 0.3.1

Choose a tag to compare

@majiayu000 majiayu000 released this 07 Oct 17:29
2f7f150

Palim 0.3.1 makes the stable-ID workflow easier to start with.

  • Use DiffPatcher::by_key("id") instead of writing an identity callback. Keys are literal object fields; identities retain JSON types, missing keys fall back to complete values, and repeated IDs remain supported.
  • Start with installation, a short undo/redo example and API selection tables in the README. Detailed contracts live in API_GUIDE.md; historical measurements and methodology remain in BENCHMARK.md.
  • Run the new RFC patch transport, configuration report and JS jsondiffpatch import examples. The existing list-history example now uses by_key.

Numeric defaults remain those of 0.3.0: exact-numbers is opt-in. Existing error and options structures are unchanged.

Local validation: 190 default and 207 exact-number tests including doctests passed in both debug and release; both all-targets Clippy configurations, Rust 1.85 library checks, warning-free documentation, all four scenario examples and package verification passed. The JS import fixture matches actual jsondiffpatch 0.7.6 output.

All six release-source CI jobs passed: Linux/macOS/Windows Rust tests, Rust 1.85, JavaScript interoperability and structured fuzzing.

v0.3.0

Choose a tag to compare

@majiayu000 majiayu000 released this 07 Oct 08:05
65506ef

Palim 0.3.0 makes exact JSON numbers opt-in.

Adding palim = "0.3" no longer implicitly enables serde_json arbitrary precision or float round-trip parsing for the entire dependency graph. This avoids changing downstream Value equality and floating-point parsing just by adding Palim.

To retain the numeric capabilities enabled by default in 0.2:

palim = { version = "0.3", features = ["exact-numbers"] }

The opt-in deliberately enables the shared serde_json precision features. Without it, parsing and wire round trips have serde_json's ordinary limits. RFC test and comparison reports still use mathematical numeric equality in both modes, including 1 and 1.0.

Both numeric modes passed debug/release tests, Clippy, and Rust 1.85 checks. The release commit passed all six remote CI jobs, including three operating systems, JS interoperability, and structured fuzzing.

The ID-list undo/redo example and owned-patch measurements are included in the repository. The consuming diff remains an experimental scratchpad prototype; this release does not add a public owned diff API.

Palim 0.2.1

Choose a tag to compare

@majiayu000 majiayu000 released this 07 Oct 05:31
ca2c28a

Documentation update

  • Installation uses palim = "0.2", and the README links to the current 0.2.1 release.
  • Document guarded subtree reuse, adaptive plain reorders, estimated byte thresholds and the scope of native move guarantees.
  • Include same-run Rust generation/pipeline measurements, output sizes, retained performance gaps and links to the complete benchmark evidence.
  • Publish the refreshed README in the crate and versioned API documentation.

Verification

  • README doctest and formatting passed locally.
  • cargo publish --dry-run --locked --allow-dirty packaged and verified the crate; the packaged README was checked against the repository contents.
  • All six remote CI jobs passed: Windows/macOS/Linux, Rust 1.85, JS interoperability and structured fuzzing.

crates.io: palim 0.2.1 · API documentation · Changelog

Palim 0.2.0

Choose a tag to compare

@majiayu000 majiayu000 released this 06 Oct 17:39
1660410

Changes

  • Guarded RFC generation reuses authenticated subtrees and invalidates records on array shifts, eliminating quadratic guard output on the measured insertion/migration cases.
  • Plain guarded disjoint primitive arrays can use positional replacements with one baseline test.
  • Private RFC maps/sets use foldhash 0.1.5 directly. It is a noncryptographic hash with a different collision-resistance contract from SipHash.
  • Direct plain generation can choose positional replacements for low-benefit unique primitive permutations, using estimated move bytes. Native deltas and their exporter retain the existing move strategy; other RFC modes keep their policy.
  • Retain input-depth and numeric-normalization checks, use parsed JSON Pointer lookups, and skip unchanged array-item export work.
  • Fix the depth regression test's stack size for Windows debug builds.

Output changes

Guarded and selected plain patch bytes/operation shapes can change in 0.2.0. Patches remain standard RFC 6902. The adaptive cost threshold compares exact replacement bytes with an estimate of move bytes; it does not promise an exact 10% bound on actual size growth. Tested rotations retain byte-identical output.

Measured tradeoffs

  • Shuffle-2000 generation: 1.4723 → 0.2715 ms (5.42×), output +8.07%.
  • Shuffle-20000 generation: 16.7728 → 3.1130 ms (5.39×), output +5.18%.
  • Foldhash-only large optimized cases: 8.1%–13.9% less generation time; output unchanged.
  • Million rotation: one move / 44 B unchanged; generation +1.8% and pipeline −2.5% in this run.

Rust json-patch still generates these shuffles faster (0.2056 / 2.1254 ms). No claim of universal leadership is made. The full A/B report retains every fixture/mode, raw batches and regressions; the separate cross-language report predates adoption of these A/B changes.

Verification

  • 202 debug and 202 release tests locally; Rust 1.85, formatting and Clippy passed.
  • 1,073 required JS interoperability paths passed.
  • 135,242 local structured fuzz runs / 61 seconds without failure.
  • 3,305 legacy frozen records unchanged, plus 128 supplemental direct-generation records across all eight RFC flag combinations.
  • 522 independent timing processes and ten allocation probes, with independent forward/inverse verification.
  • cargo publish --dry-run --locked --allow-dirty packaged and verified the crate without uploading.
  • Six remote CI jobs passed on the tagged source commit: Windows/macOS/Ubuntu, MSRV, JS interoperability and structured fuzz.

Published as palim 0.2.0 on crates.io. The uploaded crate includes the CHANGELOG spacing correction in 7842558; implementation files match the verified v0.2.0 source exactly.

Palim 0.1.4

Choose a tag to compare

@majiayu000 majiayu000 released this 05 Oct 05:54
50c72d5

RFC JSON Patch performance

Batch independent object-member moves to avoid repeated complete candidate
replay. Consecutive sibling renames now reuse the exact serialized parent-test
cost when the destination is absent. Pairing order, generated guard contents,
numeric representation and error behavior are preserved.

No public API, dependency or minimum Rust version changed. Rust 1.85 is supported.

Move batching, measured against published 0.1.3

Frozen synthetic 800-item workloads; this measurement precedes the snapshot
cost optimization below.

Input / mode 0.1.3 → Move batching Speedup
File migration / optimized 1657.142 → 6.045 ms 274.12×
Duplicate object migration / optimized 1220.311 → 4.713 ms 258.92×

For file migration / optimized, cumulative requested allocation bytes fell
from 3,886,769,369 to 12,554,369. Peak additional requested live bytes remained
about 9.5 MB; these counters are not RSS.

Snapshot cost reuse, measured against the Move-batched source

Input / guarded mode Move batching → final source Speedup
File migration / 800 items 249.079 → 11.047 ms 22.55×
Duplicate object migration / 800 items 249.290 → 8.447 ms 29.51×

Each round measured 27 input/mode combinations with separate timing and
allocation binaries and three alternating processes per version. Timings cover
already parsed values → public RFC diff API → output destruction, excluding
parsing and final serialization. These are synthetic fixtures, not production
traffic or a new competitor ranking. Ratios from the two separate rounds must
not be multiplied into an end-to-end claim. All measured output hashes match
the corresponding baseline. Ordinary small inputs did not materially improve.

Verification

  • Final source: debug/release suites passed 177 tests each.
  • Formatting, Clippy all-targets with warnings denied and Rust 1.85 passed.
  • 1,073 required JavaScript interoperability cases passed.
  • 3,269 independently compiled baseline/final wire and error records matched.
  • Local structured fuzz completed 181,932 executions in 61 seconds without a
    crash; Criterion object-migration benchmarks completed.
  • Release package verification and fresh release-mode tests passed.

Release-commit CI and registry verification are recorded in the attached receipt.

Array shifts, overwriting destinations, cross-parent moves and interleaved
writes remain outside the new snapshot-reuse case. Parent snapshots required
by the resulting guarded patch still have copying and output serialization
costs. This release does not establish universal linearity or ecosystem-wide
superiority.

Move batching report and reproducible evidence
· Snapshot cost report and reproducible evidence
· crates.io
· API documentation

Release-commit CI

Palim 0.1.3

Choose a tag to compare

@majiayu000 majiayu000 released this 03 Oct 20:34
7646a6f

Mixed-operation performance

Extend stable operation slots to proven object-member Add/Remove/Replace
boundaries. Guard preflight checks original operation intervals and exact
final values before reusing noninterleaved ancestor snapshots. Interleaved
reads, structural shifts and unproven dependencies retain full validation.

Move factorization candidates now borrow operations for actual validation;
only accepted candidates consume payloads into a new dense operation vector.
No API, dependency, number representation, guard or error contract changed.

Against published 0.1.2, on frozen synthetic 800-item workloads:

Input 0.1.2 → 0.1.3 Speedup
Mixed object edits, ordinary 40.214 → 10.679 ms 3.77×
Mixed object edits, guarded 47.746 → 13.729 ms 3.48×
Trailing root Add, guarded 1550.319 → 14.721 ms 105.31×
File migration, ordinary 1817.791 → 1698.116 ms 1.07×

The 105× result applies to this specific synthetic ancestor-snapshot case.
Migration cumulative requested allocations fell about 15.4%, and peak
additional requested live bytes about 12.8%. These counters are not RSS.
All 840 final records retained identical patch bytes and verified inverses.

Verification and limits

  • Debug/release: 172 tests each; formatting, Clippy and Rust 1.85 passed.
  • 1,073 required JavaScript interoperability cases passed.
  • Local ASan fuzz: 413,355 executions in 61 seconds without a crash.
  • Independently compiled final source matched 3,040 public, 34 internal and
    32 targeted baseline wire/error records; two new regressions passed.
  • Exact release commit passed Linux, Windows, macOS, MSRV, JavaScript and
    structured-fuzz CI. Published checksum, VCS commit, source bytes and a fresh
    Rust 1.85 registry consumer are verified in the attached receipt.

Small JSON did not materially improve: the full integer pipeline was about
0.9% slower, small loaded native about 2.4% slower. A separate allocation-saving
candidate was rejected after a 9.5% changed-container pipeline regression.
Move replay and dependent guard simulations can still have quadratic costs.
These results do not establish universal linearity or ecosystem-wide superiority.

Full report and portable evidence
· crates.io

Commit-bound CI

Palim 0.1.2

Choose a tag to compare

@majiayu000 majiayu000 released this 03 Oct 19:25
4b8e9b3

Performance fixes

  • Reuse stable original operation slots and exact per-group byte costs for
    Replace-only JSON Patch rationalization, avoiding repeated full-vector
    selection scans, guard-prefix rebuilding and compaction.
  • Release obsolete paths, payloads and metadata before root validation.
  • Format ordinary JSON Pointer tokens once and detect escaping with an ASCII
    byte scan, reducing small native diff allocations from 20 to 14.

Against published 0.1.1 on the frozen local matrix:

Input Ordinary optimized With tests
800 independent objects 27.858 → 5.861 ms (4.75×) 26.436 → 7.486 ms (3.53×)
1,600 independent objects 85.556 → 11.916 ms (7.18×) 84.113 → 15.096 ms (5.57×)

For 800 ordinary objects, peak additional requested live allocation fell
approximately 6%; guarded peak was unchanged. This is allocation accounting,
not RSS. Small loaded native diff was about 6% faster; the full double-parse
small JSON pipeline improved only about 2.2%.

All 552 final measurement records retained identical patch bytes and verified
forward/inverse application. No public API, dependencies, precision behavior,
guard rules or error contract changed. Mixed-operation rationalization can
still have quadratic costs; these results do not establish global optimality
or superiority on every input or against every competitor.

Verification

  • Debug/release: 170 tests each; formatting, Clippy and Rust 1.85 passed.
  • 1,073 required JavaScript interoperability cases passed.
  • Local ASan fuzz: 357,393 executions in 61 seconds without a crash.
  • Independently compiled final-source oracle: 3,040 public and 34 private
    records matched baseline wire output and errors; three new regression tests.
  • Exact release commit passed the existing Linux, Windows, macOS, MSRV,
    JavaScript and structured-fuzz CI jobs.
  • Registry checksum, package VCS commit, source bytes and a fresh Rust 1.85
    registry consumer were verified. The attached JSON records actual results.

Full report and portable evidence
· Commit-bound CI
· crates.io

Palim 0.1.1

Choose a tag to compare

@majiayu000 majiayu000 released this 03 Oct 17:28
6e762c1

Added since 0.1.0

  • test_json_patch: execute RFC 6902 Test operations against a borrowed document without cloning the complete document.
  • invert_json_patch_guarded: generate inverse operations with tests of the values and containers they will touch.

Fixes and performance

  • Fix legal JavaScript text inverse patches with repeated emoji and overlapping NUL/CRLF context; malformed patches remain errors.
  • Reduce array matching, scalar copy search, Unicode line scanning and atomic replacement work.
  • Reuse exact guarded subtree costs when writes and external guard reads are proven independent. Keep full simulation for unproven boundaries.
  • Remove unused target comparisons for single-operation/root-only guarded compression and combine repeated candidate/proof scans.
  • Skip redundant object key lookups when all right-hand keys were already found.

Verification and limits

The release preserves arbitrary-precision numbers, reversible native deltas and operation errors. See BENCHMARK.md and the attached repository reports for exact workloads, raw samples and validation boundaries.

Performance depends on the input and contract. Candidate processing can still have quadratic costs; small complete JSON pipelines may remain slower than JavaScript. Public configuration documents with controlled edits are verification inputs, not evidence of production adoption. No new parser backend or language bindings were added.

Final release checks

  • CI on the release commit: Linux, Windows and macOS debug/release tests, Rust 1.85, JavaScript interoperability and structured fuzzing all passed.
  • Local debug/release: 167 tests each; 1,073 mandatory interoperability cases; ASan fuzzing: 61 seconds and 322,383 executions without failure.
  • Downloaded the published 0.1.1 crate, verified its registry checksum, clean VCS commit and every production Rust source file against the CI commit.
  • A fresh consumer downloaded 0.1.1 from crates.io and passed on Rust 1.85, including the new APIs, guarded drift rejection, exact numbers and Unicode roundtrips.

Latest measured changes

Against commit 08f3735, on the same macOS arm64 machine with already parsed inputs:

  • Small configuration with guards: 8.401 → 7.560 μs (1.11×).
  • 400 independently replaced objects with guards: 11.711 → 8.882 ms (1.32×).
  • 800 independently replaced objects with guards: 38.202 → 27.471 ms (1.39×).

Ordinary 400/800 object cases were about 2% slower. All 456 measurement records retained the exact same serialized output as the baseline; this is not an all-input or competitor ranking.

Full report and raw evidence.

palim = "0.1.1"

Palim 0.1.0

Choose a tag to compare

@majiayu000 majiayu000 released this 01 Oct 09:12
38eaa8d

Palim is a Rust library for reversible JSON diff and patch.

Installation

[dependencies]
palim = "0.1"
serde_json = "1.0"

crates.io · API documentation · Benchmarks and limitations

Features

  • Reversible JSON structural deltas with serialization, patch, reverse and undo.
  • Identity-based array matching, moves, repeated identities and nested edits.
  • Unicode text deltas with UTF-16 coordinates and opt-in fuzzy application.
  • RFC 6902 JSON Patch generation, optimization, application and inversion.
  • RFC 7396 JSON Merge Patch application, generation and representable composition.
  • Comparison reports with filtering, unordered multisets and exact decimal tolerances.
  • Owned and atomic in-place APIs, depth limits and work/copy budgets.
  • Regression and property tests, a fuzz harness, JavaScript interoperability checks and cross-platform CI.

Minimum Rust: 1.85. License: MIT. No globally smallest patch or universal performance ranking is claimed; measured results and remaining slow cases are documented.