Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

RFD-0003 — Foreign-format support lives in ox-* crates, not in the language

Committed Opened 2026-05-03 · Committed 2026-05-03

Question

Where do OWL / OntoUML / Tonto / RDF / Turtle / Manchester / OBO interop crates live in the workspace, and what does the Argon language know about them?

Decision

The Argon language is foreign-format-neutral. The compiler (oxc) and the project manager (ox) carry zero foreign-format knowledge. All format-specific code lives in ox-* toolchain crates: ox-io (RDF-family IO substrate), ox-owl (OWL 2 structural types), ox-ontouml (OntoUML JSON), ox-translate (OWL-family translator), ox-catalog (IRI catalog), and any future format crate.

User-facing CLI (ox import --from=<format>, ox export --format=<format>) discovers format bridges through a toolchain extension mechanism. The language and project-manager crates depend on the foreign-format crates only at the wire-up boundary, never via direct source dependency in the elaboration or compile path.

Rationale

Formats are not the language. OWL is a serialization family for description logics. OntoUML is a UML-derived modeling notation. Tonto is a textual surface for OntoUML. None of these are Argon. Building any of them into the compiler would mean every Argon release has to coordinate with every format spec’s evolution, and every format-specific bug becomes a compiler bug.

Naming reservation enforces the rule. The ox-* namespace is reserved for the Argon Oxide toolchain. A crate named ox-something is by convention a toolchain extension, not a language extension. The reverse: argon-* crate names would imply the language depends on whatever the crate handles, which it doesn’t.

Bridges are bidirectional but asymmetric. oxc::ast and oxc::core_ir are stable public surfaces that bridge crates depend on. The bridge crates expose import/export functions consuming or producing those types. The language does not depend on the bridge crates; the bridges depend on the language.

Consequences

  • New foreign formats land as new ox-* crates. They do not touch oxc or ox.
  • Foreign-format diagnostic codes use the X* family (e.g., XW0841 for OntoUML import warnings) registered through oxc-protocol::core::codes::StaticCode + inventory::submit!. The compiler’s built-in OE / OW / OI codes do not host foreign-format variants.
  • An issue or RFD titled “Argon: support format X” is misnamed. Format support is a toolchain feature, not a language feature.
  • Existing layering violation: ox/src/cli/import.rs and ox/src/cli/export.rs currently link ox-ontouml::bridge directly. The pending extraction makes ox discover format bridges through an extension mechanism instead of compile-time linking.