Explications › Décisions › 001. The 1.0 core, and extensions outside it

Explications › Décisions

Cette page n’est pas encore traduite : voici la version anglaise.

001. The 1.0 core, and extensions outside it

The core of arche-lang is defined in the code, by layers and a check that keeps them apart. Extensions register through an API and never become part of the core.

  • Status: Accepted. The layer check is in place, and FPGA is behind the extension API (2026-11-23); the other extensions follow.
  • Date: 2026-11-23.
  • Supersedes: none.
  • Superseded by: none.

Context#

The core is the part of the language that edition 1.0 promises to keep. src/core.ts lists its constructs, and archec check --core names what a model uses outside it. The core is defined in a document, not in the code.

The architecture review of 2026-11-23 found that the code does not keep that line. src/ is flat, with 268 entries. The checker imports 48 modules, among them those of Polarion, FPGA, CAD, physics, populations, databases and the UI. So FPGA, CAD, the UI, data apps and Polarion are compiled into the core. Only the database providers (lib/plugins/*) are real plugins.

As a result, every extension can break the core, and every core change has to compile against every extension. No extension can be released or versioned on its own.

Decision#

  • The core is the lexer, the parser, the syntax tree, the 1.0 checks and the simulator. It is the code side of Le cœur du langage.
  • The code is split in layers. A layer check runs with the tests. It fails when a core module imports an extension.
  • An extension registers what it adds through an extension API: its keywords, properties, checks, generators and simulator hooks. The database providers already work this way.
  • The imports that break the rule today are listed as known. The check fails on any new one, and the list only gets shorter.
  • FPGA is the first extension to move behind the API.

Consequences#

  • An extension can no longer break the core, and a core change builds without the extensions.
  • An extension can get its own version and maturity, and be loaded only when a model uses it. That makes the bundles smaller.
  • Moving each extension out takes work, one at a time. Until it is done, the list of known imports says how far it has gone.
  • The extension API becomes a surface to keep stable, like the core.
  • Which extensions belong in 1.0 is a separate decision (005).