Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
meta-language
A Rust foundation for a universal, self-describing meta language backed by a links network. The initial crate focuses on the common structural substrate: links, references, source spans, parse status metadata, configurable trivia attachment, self-description roots, and verification that a parsed region is clean.
What Is Implemented
- A mutable
LinkNetworkwhere every item is a link. - Self-referential point links, so a point is represented without introducing a separate primitive.
- Relation links as ordinary links with ordered references to other links.
- Field labels as explicit links instead of side-table metadata.
- Source metadata: link type, named/anonymous flag, byte range, row/column
points, and
is_error,has_error,is_missing,is_extraflags. verify_full_match()for reporting error and missing links in a selected source region.parse()as the default lossless parse entry point; the explicitparse_lossless_text()boundary remains available.reconstruct_text()for byte-for-byte reconstruction from non-missing token links ordered by source span.insert_source_token(),insert_syntax_node(), andrender_source()for emitting target-language source from programmatically constructed syntax networks whose token leaves do not come from a prior parse.projected_links()for viewing the same lossless network as concrete syntax, abstract syntax, or semantic-only data by stripping lower-level preservation links from the view.NetworkSnapshotandMutableNetworkSnapshotfor immutable versioned snapshots, editable forks, provenance, and forward commits.AccessModefor a read-only or mutable engine per user configuration:freeze()/as_read_only()yield aReadOnlyNetworkview whose mutators are unreachable at compile time, andparse_engine()returns anEngineNetworkthat rejects mutation with a clear diagnostic underAccessMode::ReadOnly; the frozen form reuses snapshotArcsharing.LinkStoreandEngineLinkStorefor storage-backed create/read/update/delete and search operations: reads take&self, writes take&mut self, the default store is the in-memoryLinkNetwork, and read-only access mode rejects writes through the same storage boundary.- Optional
doubletsfeature support for a file-mappedDoubletsLinkStoreusingdoublets-rs0.4, with lossless network round trips and a documenteddoublets-webbackend label for browser/WASM exchange of the same binary graph layout. ParseConfigurationwith containment-link, token-link, or combined trivia attachment policies.- Mixed-region links for Markdown fenced code and HTML regions, plus HTML
script, style, and style-attribute regions, with
txtfallback for prose regions that content sniffing cannot classify. LinkQueryfor structural matching by link type, term, language, named flag, tree-sitter-query-like S-expressions, captures, and host predicates.find()/replace()for codemod-style query transforms over captured links while preserving unchanged source bytes.SubstitutionRule/apply_substitution()for the link-cli-style match-and-substitute operation.apply_edit()for incremental source reparsing with stable outside-edit link ids, snapshot fork sharing for unchanged links, and structural diff sets for changed, added, and removed links.- Concept-to-language syntax mappings for cross-language reconstruction.
reconstruct_text_as()for semantic cross-language reconstruction and configurable formalization levels.- Exact-match concept interning with language-bound expression links,
queryable external-id aliases, LiNo concept-set import, and
seed_common_concept_ontology()for the default 351-concept semantic lexicon plus structural programming-language concepts. - Object-identity links, many-valued
TruthValuesemantics, and fixed-pointProbabilisticTruthValueconfidence semantics. - A testable parity registry and upstream-provenanced
PARITY_FIXTURESfor executable competitor and ecosystem feature gates. - Structural LiNo parsing for links-notation doublets, triplets, named links, simple indented definitions, and self-references.
LANGUAGE_FIXTURESwith lossless parse/reconstruction samples for every required markup, programming-language, and natural-language target.NATURAL_LANGUAGE_GRAMMAR_FIXTURESwith pass/fail grammaticality fixtures for the ten natural-language targets, including provenance for the repo-authored sentences and UD-derived tag vocabulary.- Coverage targets for full
txt, Markdown, and HTML support, mixed grammar embedding, ten programming-language parser targets, and ten natural-language parser targets. - Self-description roots for
link,reference,relation link,language,grammar,type,Type,concept,point,field,trivia,region, andobject. - A lossless text parser boundary that preserves tokens, trivia, recovery markers, and mixed-region metadata behind the same representation.
Usage
use ;
let network = parse;
let report = network.verify_full_match;
assert!;
assert_eq!;
The default parse path is lossless. Callers that need a narrower view can use a projection without mutating the original network:
use ;
let network = parse;
let abstract_links = network
.projected_links
.count;
assert!;
Construct source directly as a syntax network when code should be generated before validation:
use ;
let mut network = new;
let tokens = ;
let declaration = network.insert_syntax_node;
network.insert_syntax_node;
let source = network.render_source;
assert_eq!;
assert!;
Configure the engine read-only when a parsed network must never be mutated. The
frozen view exposes every read operation but no mutators (calling one is a
compile error), and the EngineNetwork boundary rejects mutation at runtime:
use ;
let configuration = default.with_access_mode;
let mut engine = parse_engine;
assert!;
assert_eq!;
assert!; // read-only engine rejects mutation
Use the storage trait directly when links need to move between in-memory and
binary stores. The optional doublets backend is enabled with
--features doublets:
use ;
let network = parse;
let mut store = create_file.expect;
store.replace_with_network.expect;
let restored = open_file
.expect
.to_network
.expect;
assert_eq!;
let links = search.expect;
assert_eq!;
LinkStoreBackend::DoubletsWeb names the WASM/browser exchange target for this
binary graph representation; native code uses DoubletsLinkStore, while a
browser host can map the same logical records through doublets-web.
Codemod-style transforms can select links with an S-expression query and replace only captured source ranges:
use ;
let mut network = parse;
let query = from_sexpression
.expect;
let captures = network.find;
network.replace;
assert_eq!;
Cross-language reconstruction can naturalize a parsed semantic proposition into another target language, or expose progressively more formal representations:
use ;
let network = parse;
assert_eq!;
assert_eq!;
CLI
describe prints the built-in self-description network as LiNo-style definition
lines that round-trip through parse() and reconstruct_text(). verify parses
the text with the lossless text boundary and exits successfully when the
resulting region has no error or missing links.
Parity Implementation
The crate exposes PARITY_TARGETS, MARKUP_LANGUAGE_TARGETS,
PROGRAMMING_LANGUAGE_TARGETS, SECOND_TIER_PROGRAMMING_LANGUAGE_TARGETS,
NATURAL_LANGUAGE_TARGETS, DATA_FORMAT_TARGETS, and
GRAMMAR_EMBEDDING_TARGETS so comparison scope is part of the tested Rust API.
It also exposes PARITY_FIXTURES, with executable, provenance-tracked fixtures
covering every advertised target capability, and LANGUAGE_FIXTURES, with a
lossless fixture for every requested language target.
The current registry tracks tree-sitter, LibCST, Recast, jscodeshift, Rowan,
cstree, Roslyn, links-notation, link-cli, lino-objects-codec,
relative-meta-logic, formal-ai, and meta-expression.
Internal ecosystem fixtures now structurally parse links-notation doublet,
triplet, tuple, indented, and self-reference cases; link-cli create/update/delete/swap
substitutions; lino object round-trip, shared-reference, and circular-reference
cases; relative-meta-logic dependent, many-valued, probabilistic, and
liar-paradox cases;
formal-ai seed and benchmark .lino corpora; and meta-expression formalize and
naturalize examples backed by the verified 351-concept lexicon.
See docs/parity-roadmap.md for the feature matrix, executable fixture gates, and language coverage targets.
Development
This repository uses changelog fragments in changelog.d/; code changes should
include a fragment with the intended semantic-version bump.