Skip to main content

Crate thread_conformance

Crate thread_conformance 

Source
Expand description

§The Thread conformance suite

A standard is only real if it can be checked without the reference browser. This crate is that check: point it at a corpus of worlds (a directory of world.jsons) and it reports, browser-independently, whether they honour the spec — manifests validate, worlds are enterable, links are well-formed, and the constellation hangs together. It’s the artifact that lets a third party prove their worlds (or their own engine’s output) conform, with zero contact.

Clauses are either Error (a real conformance violation — fails the suite) or Warn (a quality signal that doesn’t break interop — reported, but the suite still passes). run returns a Report; Report::passed is true when no Error clause failed.

Modules§

relay
Relay conformance — does a presence relay speak presence-wire-v0.1?
rendezvous
Rendezvous conformance — does a P2P rendezvous speak presence-topology-v0.1 §3.2?

Structs§

Clause
The outcome of one conformance clause.
Corpus
A loaded corpus: the worlds that validated, plus the ones that didn’t.
LoadError
A world that failed to load or validate.
Report
The full conformance report over a corpus.
World
A world that loaded and validated.

Enums§

Severity
Whether a failed clause breaks conformance or is merely a quality signal.

Functions§

clauses_pass
Whether a slice of clauses passes (no failed Error clause).
load_corpus
Load every world under root (one per immediate subdirectory — a world.json, or a world.thread markup source when only that exists), parsing and validating each through the reference manifest implementation.
run
Run the full suite over a loaded corpus.
single_corpus
Build a one-world corpus from a single manifest’s text (the live-host path: fetch a thread://host and run the spec clauses on what it served). name is the world’s corpus key (its Locator path/host).
transport_clauses
The transport contract a live host must satisfy so any browser — including a cross-origin web one — can walk it. Pure over the response facts, so it’s testable without a network. reachable is whether the GET completed with a 2xx.