AxiomCore
Acore Language

Standard library

Modules, types, and native intrinsics exposed by the current Acore evaluator.

The embedded resolver currently exposes a deliberately small standard library. Import a module with its acore: URI:

import "acore:math"
largest = math.max(12, 20)

Resolved modules

URIPublic surface
acore:baseCore value classes, collections, Regex, and Axiom contract schema classes. Loaded by contract tooling as the base schema.
acore:mathmin, max, sqrt, log, plus mathematical constants declared by the module. Native support currently guarantees max and pi; validate other members before depending on them.
acore:jsonparse(source: String): Any.
acore:yamlparse(source: String): Any.
acore:xmlRenderer { indent, rootElementName } configuration.
acore:protobufRenderer { indent } configuration.
acore:ProjectPackage/dependency metadata used by Acore project resolution.

Core scalar members

String

MemberResult
length, lastIndexInt
isEmpty, isNotEmptyBoolean
getOrNull(index)String?
substring(start, exclusiveEnd)String
repeat(count)String
contains, startsWith, endsWithBoolean
toUpperCase, toLowerCase, trimString
toInt, toFloat, toBooleanParsed scalar
split(pattern)List
replaceFirst, replaceAllString

Numbers and Booleans

  • Number: isPositive, isFinite, isInfinite, isNaN, isNonZero.
  • Int: isEven, isOdd, toFloat(), toRadixString(radix).
  • Float: toInt().
  • Boolean: xor(other), implies(other).

Collections

List and Set

Both expose length, isEmpty, contains, map, filter, flatMap, fold, and join. List also exposes first and last.

labels = ["one", "two"].map((value) -> value.toUpperCase())
csv = labels.join(",")

Map

Map exposes length, isEmpty, containsKey, mapKeys, and mapValues.

Regex

Regex(pattern) creates a compiled regular expression. A regex exposes its pattern, findMatchesIn(input), and matchEntire(input).

identifier = Regex("^[a-z][a-z0-9-]+$")
valid = identifier.matchEntire("tasks-api")

Invalid patterns fail evaluation.

JSON and YAML parsing

import "acore:json"
import "acore:yaml"

jsonValue = json.parse("{\"enabled\":true}")
yamlValue = yaml.parse("enabled: true")

The parsers return Acore scalar, list, and map values. They do not validate the result against an Axiom contract automatically.

Axiom contract schema

acore:base also declares the service contract API: Config, project/backend configuration, policies, models, endpoints, types, domain and security models, mocks, and tests. Those classes are catalogued in the Acore schema reference.

Defined but not currently resolved

The repository contains definitions for semver, shell escaping, test helpers, platform/release metadata, benchmarking, reflection, and additional renderers. The embedded get_stdlib_module resolver does not currently return all of those modules. They are implementation work, not a supported import surface, and are intentionally excluded from runnable examples.

On this page