CBOR‑LD 1.0 · Swift 6 · Apple + Linux

Linked data.
Exact bytes.
Native Swift.

Encode JSON‑LD into compact CBOR‑LD, restore it under explicit limits, and inspect the evidence behind every compatibility claim. The open core stands alone; optional GPU acceleration connects to the separately licensed SemanticCompute binary.

Dependencies
0 in core
Platforms
Apple + Linux
Core licence
BSD‑3‑Clause
deterministic transform registry 1
JSON‑LD input
{
  "@context": "…/activitystreams",
  "type": "Note",
  "summary": "Exact by construction"
}
CBOR‑LD bytes
d9cb1d8201a300182a01644e6f7465
Byte identity verifiedSwift output matches the published corpus.
encode → decode → compare passed
74release tests
16/16four-way cross-decodes
11/11benchmark fixtures won
2.22×measured round-trip speedup

Interoperability evidence

Compatibility is a result,
not a promise.

The test platform crosses Swift output through independent JavaScript, Rust, Python, and Go paths, then keeps byte consensus separate from semantic round‑trip agreement.

shared fixture matrixoverall · passed
FixtureCross-decodesBytesStatus
empty / uncompressed16 / 16exactpassed
default table16 / 16exactpassed
inline context16 / 16exactpassed
custom type table16 / 16exactpassed
JSON shapes16 / 16semanticpassed
Unicode + boundaries16 / 16exactpassed

Measured, release mode

Swift scales with the document.

Explore the current in-process round-trip results. Each adapter warms up first, consumes every result through a barrier, and excludes process startup and protocol I/O.

round trips / second2.17× faster
Swift4.2
native
Rust1.9
reference

One core, explicit boundaries

The document stays on the CPU.
The bounded work can travel.

Recursive JSON trees, context inheritance, dynamic maps, and document loading remain in the native Swift core. Dense, bounded byte and integer workloads can use a separately installed, commercially licensed SemanticCompute binary through the optional adapter.

01Your Swift appJSON‑LD values · models · streams
async / sync API
02CBORLD corezero dependencies
Semantic transformcontexts, dictionaries, codecs
Strict CBORlimits, duplicate keys, diagnostics
Deterministic outputcompatibility + RFC 8949 profiles
IntegritySHA‑2, fingerprints, manifests
eligible bounded work
03 · optional integrationSemanticCompute binary adapterLinks the signed commercial binary for exact UInt32 and byte families. SemanticCompute implementation source is not included.
commercial · SC 1.23
01

Context aware

Remote, embedded, imported, type-scoped, and property-scoped contexts with protected-term and propagation behavior.

02

Untrusted-input limits

Bound input bytes, nesting depth, container sizes, duplicate keys, indefinite lengths, and preferred-width validation.

03

Prepared sessions

Build dictionary indexes once, deduplicate context loads, and preserve per-document semantic isolation across concurrent work.

04

Inspectable integrity

Transport hashes, structural fingerprints, pinned resources, verification reports, and versioned out-of-band manifests.

Swift Package Manager

Add CBOR‑LD at the source.

The core is a regular open-source Swift library. SwiftPM resolves its tagged source and chooses the appropriate linkage for your application.

macOS 13+iOS 16+tvOS 16+watchOS 9+visionOS 1+Linux
Commercial acceleration boundary

The optional adapter requires the SemanticCompute binary package and a SemanticCompute licence. Its CPU fallback preserves results when a dispatch is unsuitable; it does not remove the build, link, or redistribution requirement after the adapter is imported.

dependencies: [
  .package(
    url: "https://github.com/entertrainmentuk/swift-cborld.git",
    from: "0.1.0"
  )
]
Swift 6core dependency count · 0