v5 is a coordinated major release across the Rust core crate and every
language binding — WASM, Node, Python, C, Go, JVM, .NET, and PHP. For
step-by-step v4→v5 migration, see MIGRATION.md.
Added
-
Node-native binding (
@goplasmatic/datalogic-node) via napi-rs,
shipping per-platform.nodeprebuilds. WASM is now positioned for
browser/edge; Node services should prefer the native binding. -
Python binding (
datalogic-py) via pyo3 + maturin, with abi3-py310
wheels across Linux (gnu/musl, x86_64/aarch64), macOS, and Windows. -
C ABI crate (
bindings/c) via cbindgen, exposed as a static and
shared library consumed in-tree by the Go / JVM / .NET / PHP bindings. -
Go binding (
datalogic-go) over the C ABI, with a synthetic
bindings/go/v*tag published by the release pipeline. -
JVM binding (
io.github.goplasmatic:datalogic) via JNA over the
shared C cdylib, published to Maven Central. -
.NET binding (
Goplasmatic.Datalogic) via P/Invoke over the
shared C cdylib, published to NuGet. -
PHP binding (
goplasmatic/datalogic) via PHP FFI over the shared
C cdylib; ships via a subtree split toGoPlasmatic/datalogic-php
(Packagist resolves from tags). -
flagdCargo feature — opt-in OpenFeature flagd-compatible operators
(spec):fractional— deterministic murmurhash3-x86-32 percentage bucketing,
matching the canonical Go evaluator's(hash * total_weight) >> 32
integer distribution. Hash implementation vendored inline (~30 LOC,
no external dep) for portability across every target.sem_ver— semantic-version comparison with the spec's four input
normalizations (stripv/Vprefix, pad partial versions, coerce
numeric input, drop build metadata). Backed by the optional
semvercrate.
Both return
nullon malformed input; conformance test suites under
crates/datalogic-rs/tests/suites/flagd/mirror the upstream
fractional_test.go
andsemver_test.go. -
Custom operator registration across every language binding — WASM,
Node, Python, C ABI, Go, JVM, .NET, and PHP now expose a way to
register host-language callbacks as JSONLogic operators, with a
uniform JSON-string in/out contract. See
bindings/BINDINGS.md. -
Module-level helpers:
datalogic_rs::eval,eval_str,eval_into,
andcompile— backed by a default engine, no construction required. -
engine.eval_into::<T>(...)for typed deserialization of results. -
engine.compile_arc(...)for the cross-thread sharing pattern. -
with_constant_folding(false)builder flag for tree walkers
(debuggers, alternate evaluators). -
TracedSessionmirrorsSession1:1 — everyeval*returns
TracedRun<R>. The C ABI surfaces a parallel
datalogic_traced_session_*family so JVM / .NET / PHP / Go share
the same session-with-trace contract. -
ArenaExttrait for ergonomicCustomOperatorreturn values, plus
a publicbumpalore-export. -
IntoLogicandFromDataValuetraits for boundary conversion. -
Public docs site (mdBook) at
docs/, deployed via.github/workflows/docs.yml. -
Cross-library benchmark matrix under
tools/benchmark/(datalogic-rs
vs. json-logic-* and WASM peers). -
Arena-mode evaluation dispatch: every operator now has a native
arena variant (no legacy bridge fallbacks), structured-error
breadcrumbs carry a node-id path, and the trace pipeline reuses
CompiledNode::iddirectly instead of a side-table HashMap.
Changed
- Breaking — Cargo feature rename:
compat→serde_json. - Breaking — Engine construction is builder-only. Replace
Engine::with_config(c)withEngine::builder().with_config(c).build(),
andEngine::with_preserve_structure()with
Engine::builder().with_templating(true).build(). - Breaking — feature rename:
preserve_structure→
templating(semantics unchanged). - Breaking — one-shot evaluation API.
engine.evaluate_json(rule, data) -> Value
is replaced byengine.eval_str(rule, data) -> String(JSON in/out)
orengine.eval_into::<T>(rule, data)(typed). - Breaking — value-boundary evaluation.
engine.evaluate_owned(&logic, value)→
engine.eval_into::<serde_json::Value, _, _>(rule, &value). - Breaking — compile from
&Value.engine.compile_serde_value(&v)→
engine.compile(&v)via theIntoLogictrait (requiresserde_jsonfeature). - Breaking — trace API.
engine.evaluate_json_with_trace(...)→
engine.trace().eval_str(...), returningTracedRun<R>. - Breaking — custom operator surface.
ArenaOperator→
CustomOperator; context type&mut ContextStack<'a>→
&mut EvalContext<'_, 'a>. - Breaking — npm package rename: WASM is now published as
@goplasmatic/datalogic-wasm(was@goplasmatic/datalogic). Node
consumers should switch to@goplasmatic/datalogic-node. - Errors surface structured
operator/node_ids/kindgetters;
resolve_path(&compiled)returns root→leafPathSteps. EvaluationConfigandNumericCoercionConfigare now#[non_exhaustive].PathStepis#[non_exhaustive]and implementsDeserialize.- MSRV: Rust 1.85 (edition 2024).
- Monorepo layout flattened to
crates/(Rust core),bindings/(one
folder per language wrapper),ui/(React debugger), andtools/
(dev-only). See ARCHITECTURE.md. - Release pipeline split into an orchestrator (
release.yml) plus
per-bindingworkflow_callfiles; coordinated by a singlev*tag
with strict pre-publish version-drift validation.
Removed
- Breaking —
compatfeature and theLegacyApitrait. No
deprecated v4 shims remain in the v5 crate; rewrites are mechanical
per MIGRATION.md. - Breaking —
data_to_json_stringhelper. Usedatavalue::Display
(.to_string()) instead. - Breaking —
EvaluationConfig::new()constructor (use the fluent
setters /Default).
Migration
See MIGRATION.md for the authoritative v4→v5 cookbook,
including a 60-second checklist, method-by-method translations,
side-by-side patterns, and structural-error consumer recipes.