Extensions and packages

[ AxiomCore · Documentation ]

Extensions

What a sandboxed executable extension is, what authority it receives, and which languages and targets support it.

An executable extension is a small Rust, TypeScript or Python module that AxiomCore compiles to WebAssembly and runs in a sandbox. Use one when a rule is impractical to express in declarative Acore, for example a pricing rule, a format conversion or one step of a domain workflow. An Acore UI action calls it through use extension, and a backend action can bind it as a verified sandbox implementation (see Execution plan). The extension never runs as ordinary code inside your application process.

How a call crosses the sandbox

An extension call passes through the host on the way in and on the way out
An extension call passes through the host on the way in and on the way out
Diagram source
flowchart LR
  A[Acore action] --> B[Extension host]
  B --> C{Authority check}
  C -->|allowed| D[WebAssembly guest]
  C -->|denied| H[Reject and audit]
  D --> E[Result, effect plan or patch proposal]
  E --> F{Host validation}
  F -->|valid| G[Commit and audit]
  F -->|invalid| H

The host loads only a signed, verified module. It hands the guest one typed input, the state snapshots the extension is allowed to read, and a deadline. The guest returns a typed result, one bounded plan of effects to perform, or a proposal to change state. The host checks types, invariants, authorization, revision conflicts and cancellation before it commits anything, records an audit entry either way, and stays responsible for notifying subscribers and for teardown. Ordinary Acore rendering and backend handling never enter this boundary; only an explicitly bound extension call does.

Authority

The authority an extension can use is the intersection of three inputs:

InputWho writes itWhat it says
Authority requestThe extension author, in AxiomDeps.tomlThe maximum the extension asks for. Omitted capabilities are denied.
Application grantThe application owner, signed at releaseWhat this application allows the extension to use.
Target policyOne signed policy per targetWhat the web, Android, iOS or server host permits.

The host checks the intersection when it loads the module and again for every operation. A target policy can narrow a request but cannot add to it. A package version change never raises authority on its own; a permission increase needs explicit approval.

The guest never receives:

  • a mutable application object, database connection, ORM session or native pointer;
  • ambient network, filesystem, environment, process or WASI access;
  • an arbitrary field path, service name, URL or host method;
  • authority granted to another extension instance.

Languages

LanguageSource profileMain limits
RustTyped macros compiled to core WebAssemblyNo unsafe, native linking, build scripts, proc-macro packages or arbitrary Cargo workspaces
TypeScriptStatically bundled ESM compiled with JavyNo Node, DOM, dynamic import, eval, timers, network or persistent heap
PythonRestricted Python 3.12, compiled ahead of timeReviewed syntax and pure py3-none-any wheels only; no host Python, native wheels, reflection or dynamic imports

All three lower to the same ABI, authority model, broker and audit identities. See Build an extension for toolchains and SDK versions. The support matrix is authoritative for status.

Targets

TargetHostLimit
Server and headlessShared Rust hostDurable production-store adapters are not certified.
WebDedicated Chromium WorkerNot claimed for every browser engine or deployment topology.
AndroidShared Rust host on Android EmulatorPhysical devices are not certified.
iOSShared Rust host on iOS SimulatorPhysical devices are not certified.

UI that needs a framework runtime (React, Vue or DOM) is a different path: a Web-only, visibly foreign iframe island. It cannot share the application document or run on native targets. A small static HTML, literal JSX or Vue template subset can instead be translated at build time into ordinary Axiom UI, which runs no framework runtime.

Extensions and packages

A declarative package, such as a theme or component library, is .axiom data with no executable code. An extension package holds only metadata and the digest of a separately distributed WebAssembly module, so it also needs the signed authority workflow in this section.

Next steps