Tooling

Lint, format, debug, LSP, AOT packages, cross-language emitters — shipped, not promised.

One binary, the whole workflow

The elder binary is the runtime and the toolchain:

elder lint <path...>          # diagnostics; --format=json, --fail-on=warn
elder fmt <path...>           # canonical formatting; --check for CI
elder doctor                  # runtime / ABI / toolchain health
elder env [--list]            # every env knob, defaults + current values
elder package build <manifest.ldr> --out <root>
elder --aot <file.ldr>        # run through the AOT native tier
elder --run-package <pkg[@version]> [-- <args...>]
elder --debug --break <file:line> <file.ldr>

Lint and fmt

elder lint runs syntax plus shallow semantic checks and emits structured diagnostics — coded (E2xxx / W2xxx / H2xxx), locatable, and available as JSON for editors and CI (--format=json, --severity=..., --fail-on=warn). elder fmt formats to one canonical style with --check / --stdin / --line-width for pipelines. Every .ldr file on this site passes through both.

Debugger and language server

elderdbg is an interactive debugger for Elder programs — breakpoints, stepping, value inspection — and speaks DAP, so VS Code debugging works against real running scripts. elderlsp is the language server: live diagnostics, completion, hover (fed by /// doc comments), and formatting, in any LSP-capable editor.

From script to native package

The same source runs along a gradient: interpret it while iterating (elder app.ldr), then AOT-compile it (elder --aot app.ldr) or build it into a distributable package (elder package build) that elder --run-package executes and import resolves. Engine parity is tested — the interpreter and the AOT tier are held to the same behavior by the language's test suite. Functors declared native(cpp) lower to direct C++ for the hot paths that earn it.

Cross-language emitters

Elder source can be emitted as readable source in other languages — the compiler's canonical IR rotates out through per-language axes:

$ echo 'add::(a, b) { return a + b }
print add(2, 3)' > add.ldr
$ elder --emit-js add.ldr
'use strict';
// elder-js-axis v2 (Symmetry-rotated)

function add(a, b) {
    return (a + b);
}
print(add(2, 3));

# also: --emit-php --emit-python --emit-dart --emit-go --emit-rust --emit-cpp

Maturity is uneven and we say so: the JS and PHP targets are round-trip tested; python, dart, go, rust, and cpp are experimental. The output is deliberately readable source, not an opaque transpile — the point is escape hatches and interop, not lock-in.

Builds and packages

EBBS — the eons build system, written in Elder — drives package builds across the stack, and the Constellatus registry is what import("pkg") resolves against at load time. The build system, the registry, and the language sharing one runtime means there is no separate build-time meta-language to learn: a build.ldr is just Elder.