Acore Language
Acore language
Author typed, declarative software contracts and Acore UI applications.
Acore is the declarative language at the center of AxiomCore. The implementation has its own lexer, parser, lazy evaluator, renderer, standard-library bridge, diagnostics, and language server. It is not Pkl source and does not require a Pkl runtime.
Read the manual in this order
- Syntax overview — modules, properties, typed objects, collections, and comments.
- Values, types, and operators — literals, nullable and union types, expressions, and precedence.
- Objects, classes, and functions — declarations, modifiers, dynamic members, lambdas, and scope.
- Imports, contracts, and composition
— the ownership boundary between
import,amends,use, andextend. - Evaluation and output — lazy evaluation, security boundaries, rendering, variants, and errors.
- Standard library — the modules and intrinsics that the embedded resolver currently exposes.
- Acore UI profile — applications, pages, state, actions, service bindings, and target compilation.
Contract profiles
The language syntax is shared, but a compiler profile determines which top-level declarations are meaningful:
| Profile | Primary declarations | Output |
|---|---|---|
| Service contract | project, backend, models, endpoints, policies, domain, security, testConfig | .axiom service package |
| Declarative package | Package envelope plus kind-specific exports | .axiom theme, component-library, database-schema, extension-metadata, or application-policy package |
| Acore UI | module, use, app, page, state/query/mutation/action, view | In-memory UI graph or .axiomapp |
Do not assume that a declaration accepted by one profile is available in another. The CLI selects the compiler path from the command and source.
Minimal service source
amends "axiom-fastapi:./main.py:app"
project {
id = "tasks-api"
version = "0.1.0"
}
policies {
retry = RetryPolicy { maxAttempts = 3 }
}Minimal Acore UI source
module example.hello.ui
app Hello { route "/" => Home }
page Home {
view {
SafeArea {
Text("Hello from Acore")
}
}
}Use the Acore schema reference for contract-specific classes and defaults.