Repository navigation
Swift-JSON 1.2.0 — Linux and WASI support
Swift-JSON 1.2.0 adds qualified Linux and full-language WebAssembly/WASI command support to the existing exact, resource-bounded JSON package. It retains the same four public products, strict semantics, offline schema engine and empty root dependency graph.
Platforms and compatibility
- Linux: Swift 6.4 on 64-bit Ubuntu 24.04/glibc, qualified on ARM64 and x86_64 with behavior, independent suites, Address/Leak Sanitizer, Thread Sanitizer and clean source reproduction. Other distributions, musl and 32-bit Linux are outside this qualification.
- WASI: full-language Swift 6.4,
wasm32-unknown-wasip1, using the matchingswift-6.4.0-RELEASE_wasmSDK. Command execution is qualified with WasmKit 0.3.1 and Node 26.5.0/V8. Browser integration, Embedded Swift, WASI threads, wasm64 and other host/SDK versions require separate qualification. - Apple: Swift tools/compiler 6.4+, Swift language mode 6, and macOS/iOS/iPadOS 27+ remain the baseline. Existing mobile qualification and its physical-iPad deferral are preserved; this release adds no new physical-device claim.
.package(url: "https://github.com/ThorFuchs/Swift-JSON.git", from: "1.2.0")Products remain JSON, JSONSchema, JSONStreaming and JSONPatch. JSONRegexRuntime stays private. Original code remains Apache-2.0 with all applicable upstream notices retained.
Changes
- Replace CryptoKit schema-resource hashing with an original, package-private portable SHA-256 implementation. Hashing participates in the active cumulative compilation budget, cancellation and logical scratch accounting. The nine packaged Draft 2020-12 resources retain their exact integrity pins; no dependency or alternative schema engine is introduced.
- Classify twelve cumulative quotas as checked UInt64 counters so finite defaults can exceed
Int.maxon wasm32. The other 37 metrics retain allocation/capacity guards. All 49 metric definitions, finite profile values and logical weights are unchanged. Synthetic boundary tests do not imply allocating or executingInt.maxquantities of work. - Check cumulative retired-report overflow before admitting work; caught owned failures remain terminal. Preserve native cancellation rendezvous and qualify cooperative WASI checkpoints after actual counted progress.
- Load schema resources beside the WASI command. Deploy
Swift-JSON_JSONSchema.bundlealongside the executable, provide an absolute guest command path asargv[0], and preopen that directory at the matching guest path. Missing resources produce structured compilation errors. WASI deployment contract. - Preserve exact bounded decimals, decoded Unicode-scalar identity, ordered objects, native value Codable, scoped reads, exact persistence, immutable offline plans, Patch and pull-stream semantics across the qualified hosts. Linux contract.
The frozen source changelog describes WASI under Unreleased and retains the already released 1.1.1 schema-builder correction there. These versioned notes bind the platform changes to 1.2.0 without changing the qualified commit or relabeling the 1.1.1 fix as new work.
Qualification
The annotated tag targets 25fb04f747e583209b4c4511abf39e11ef5b4f80. Its Native CI and Linux CI passed all seven qualification lanes, followed by documentation deployment. Debug, release and full ASAN execute 192 test functions and 173 parameterized invocations on each native/Linux architecture; TSan exercises six concurrency functions per safety lane. Strict memory-safety compilation passes.
The exact same public source bytes passed 65 WASI qualification commands: Node executes the full debug/release root suites and independent runner; both hosts execute 13 public consumer functions, all 49 cap outcomes, 20 explicitly rooted schema vectors, command parity and structured missing-resource cases. WasmKit does not claim the full independent/root-suite scope. WASI sanitizer instrumentation is unavailable in this pinned toolchain and is not counted as a sanitizer pass; native/Linux safety provides the shared-source sanitizer evidence.
Independent suites record syntax 318 observed / 287 evaluated successes / 31 policy cases, and schema 2,337 observed / 2,300 evaluated successes / 37 policy cases. Policy exclusions are separate from evaluated successes. Authored qualification includes 82 public semantic cases, nine budget/report cases and 4,396 deterministic malformed-input replays. Root tests include 31,824 regex differential cases, 18,853 Unicode normalization cases/94,265 comparisons and 874 format vectors. The downstream public consumer validates 20 explicitly selected definitions (eight valid, twelve ordinarily invalid), with two separate operational errors; it does not establish MCP conformance.
The attached public evidence preserves actual command exits, counts, input pins, source hashes, clean extracted native/Linux/WASI reproduction and an independently resolved remote-tag consumer. The source archive is reproducible and contains 820 source files plus its manifest. Four matching DocC catalogues contain 2,052 verified files, with 582/582 authored public declarations documented and ten executed README examples.
Performance and boundaries
The final native A/B/A/B comparison uses two runs per source, nine repetitions, three warmups and three invocations per sample over twelve identical workloads. Tiny exact parsing changes from 21.118 to 23.257 microseconds (+10.13%, +2.139 microseconds), crossing the unchanged 10% review trigger. The reviewed disposition retains checked cumulative report accounting and the measured validator fast path. Avoidable initial overhead was corrected before final qualification. The other eleven workloads stay below the trigger; root-array streaming changes +5.03% (1.018145 to 1.069311 seconds), with its 52-byte logical peak unchanged. All twelve logical peaks are unchanged.
Short-duration variation and host drift limit attribution; these measurements do not guarantee throughput or statistical equivalence. Earlier approximately +11% and +15.76% streaming reviews retain their separate baselines and dispositions. Logical retained bytes, allocated WASI linear-memory pages and host RSS are different measurements. Caller callbacks are outside owned instruction quotas, and cancellation checkpoints are not wall-clock preemption or host fuel limits. Node's WASI filesystem is not a security boundary for untrusted code.
SIMD/parallel batch experiments, E11 projection and E12 JSON text-sequence framing remain deferred. No precompiled SDK-linked WASM binaries are included in the release assets.
Assets and support
Verify the source archive, matching compiled DocC archive, public evidence archive and qualification receipt against SHA256SUMS. Source/evidence archives include exact file manifests; the DocC manifest accompanies its archive. Public assets exclude private maintainer records, personal device identifiers, credentials and build products.
Online documentation follows qualified main; the attached DocC archive matches this tag. Support · Private security reporting · Source changelog.