Scalar types
i8/u8, i16/u16, i32/u32, i64/u64, isize/usize, f32/f64 and bool.
The Nexus SDK is the standalone Apache-2.0 compiler, package/build system and systems-development toolkit used by Frames. This documentation covers the public command surface, language workflow, native Frames targets, FEX/FAPP packaging, signing, C/C++ interoperability, debugging, performance evidence and kernel tooling.
External GitHub x64/ARM64 certification remains a separate gate; the page does not represent that pending matrix as completed.
The SDK repository packages the same immutable canonical compiler/toolchain source intended for Frames consumption. Published versions are version/hash pinned so Frames does not carry a silently forked compiler.
./nexus --version
./nexus check examples/hello.nx
./nexus run examples/hello.nx
./nexus doctor
./nexus targets
./nexus abimodule hello;
fn add(a: i64, b: i64) -> i64 {
return a + b;
}
fn main() -> i32 {
let answer = add(20, 22);
print(answer);
return 0;
}let creates an immutable binding; var creates a mutable binding. Functions declare parameter and return types explicitly, while modules give source units a stable identity.
./nexus new hello-frames
cd hello-frames
../nexus lock
../nexus build --reproducible --receipt
../nexus test tests
../nexus fmt --check .
../nexus lint --deny-warnings src/main.nxA Nexus project uses nexus.toml plus a deterministic nexus.lock. Lock format v2 records the Nexus version, source hash, project files and dependencies. Reproducible mode and build receipts make the build inputs/output identity inspectable instead of implicit.
[package]
name = "HelloFrames"
version = "1.0.0"
publisher = "Example Developer"
[build]
entry = "src/main.nx"
[frames]
kind = "app"
capabilities = []
icon = "assets/app-icon.png"i8/u8, i16/u16, i32/u32, i64/u64, isize/usize, f32/f64 and bool.
Structs, enums/tagged payload enums, fixed arrays, vectors, strings, references and generic functions/aggregates in the hosted profile.
if/else, while, matching/tagged-enum flows and true short-circuit &&/|| lowering on native x86-64 and ARM64.
Traits, Option/Result, closures/iteration and generic functions are available in the broader hosted reference profile.
The hosted C17 backend is intentionally the broadest executable language profile today. Native Frames backends implement a narrower systems/bootstrap subset; see Current boundaries before assuming hosted/native parity.
Nexus combines move/use-after-move checking, borrowing/reference rules, deterministic cleanup, bounds-checked collections, effects/capabilities and an explicit unsafe boundary. The toolchain includes audit and safety-certificate commands so projects can make those boundaries visible in CI.
./nexus audit src/main.nx --deny-unsafe --deny-extern
./nexus safety-cert src/main.nx --strict -o safety.json
./nexus compare-safety --jsonOwned resources registered in a lexical cleanup scope are released when that scope exits; explicit drop is idempotent, and defer is block-scoped/LIFO. This is still an evolving systems memory model rather than a claim of complete path-sensitive destruction/unwind analysis.
| Target | Status | Backend / output |
|---|---|---|
host | Stable | Hosted C17 reference backend → native host executable |
frames-x64 | Stable | Native x86-64 → Frames FEX64/1 |
frames-arm64 | Preview | Native AArch64 → Frames FEX64/1 |
frames-pe-x64 | Compatibility | Native x86-64 → Frames PE32+ compatibility output |
./nexus build src/main.nx --target frames-x64 -O3 -o Hello.fex
./nexus inspect Hello.fex
./nexus targets --json
./nexus abi --jsonNexusABI/1 fixes scalar widths, defines explicit extern "C" boundaries for hosted FFI, avoids C++ name mangling at that boundary and records versioned build receipts. Native Frames programs use the Frames ABI rather than pretending to be Linux applications.
| Extension | Role |
|---|---|
.fex | Frames executable |
.fapp | User-facing Frames application bundle |
.fsetup | Guided setup/installer bundle |
.fpkg | General Frames package |
.flib | Frames library artifact |
.fdrv | Frames driver artifact |
.fsvc | Frames service |
.fmod | Loadable module |
.ftheme/.ficon/.ffont | Desktop resource packages |
.fupdate/.frecovery/.fbackup | Update, recovery and backup payloads |
.nx | Nexus source |
Extensions are dispatch/presentation metadata; Frames still validates the binary/container metadata and integrity before granting execution or trust.
./nexus build src/main.nx --target frames-x64 -O3 -o HelloFrames.fex
./nexus keygen -o publisher.key --publisher "Example Developer"
./nexus package . --kind app --locked --sign-key publisher.key -o HelloFrames.fapp
./nexus inspect HelloFrames.fapp --require-signed --trust-key publisher.keyFrames application/setup/package containers use deterministic bundle contracts with a manifest and integrity data. The SDK also exercises Ed25519 publisher signing, trust and tamper-rejection paths. A signature proves publisher-key possession/trust policy; it does not automatically grant application capabilities.
extern "C" fn puts(s: str) -> i32;
fn main() -> i32 {
puts("Hello through the C ABI");
return 0;
}./nexus bindgen-c library.h -o library_bindings.nx --module library_bindings
./nexus export-c src/api.nx -o include/api.h
./nexus cxx-bridge library.hpp -o build/bridge --compileThe bindgen intentionally supports a conservative C prototype subset and skips unsupported declarations rather than guessing. Native Frames external-symbol relocation/dynamic FFI is not yet part of the current native contract.
The hosted profile includes structured tasks, async/await, channels, atomics and effect/capability contracts. Safety checks are intended to reject selected invalid ownership/borrowing/concurrency patterns before execution.
async fn work(seed: i64) -> i64 effects() {
return seed * 2;
}
fn main() -> i32 effects(io, task, panic) {
let a = work(21);
let value = await a;
print(value);
return 0;
}These broader hosted capabilities should not be assumed to have complete parity on every native Frames backend yet.
./nexus debug-build src/main.nx -o build/app-debug
./nexus ide-info src/main.nx --json
./nexus profile src/main.nx -n 5 --json
./nexus explain NX3005
./nexus doctorSDK self-tests cover structured diagnostics, debug/profile/IDE tooling and the language-server-oriented information path. JSON diagnostic/report modes are intended for editors, CI and build systems as well as terminal use.
The following list mirrors the packaged nexus --help command surface.
checknexus check [source]Parse and type/safety-check Nexus source without producing a final executable.
buildnexus build [source] -o app [--target ...] [-O0..3] [--locked] [--reproducible] [--receipt]Build hosted or native Frames output with optional lock/reproducibility and build receipt.
runnexus run [source]Build and execute a hosted Nexus program.
testnexus test [path]Run Nexus test files or a test tree.
newnexus new <name>Create a Nexus project scaffold.
fmtnexus fmt [--check] [path]Format source or verify formatting without modifying it.
docnexus doc [source] -o <output>Generate API documentation from Nexus source.
lintnexus lint [--deny-warnings] [source]Run static lint checks and optionally make warnings fatal.
locknexus lock [path]Generate/update the deterministic nexus.lock dependency/source record.
packagenexus package [path] --kind {app,setup,package} -o <file> [--locked] [--sign-key <key>]Create Frames application/setup/package containers.
inspectnexus inspect <file> [--trust-key <key>] [--require-signed]Inspect native Frames artifacts and optionally require publisher trust.
keygennexus keygen -o <key> [--publisher <name>]Generate a publisher signing key.
filetypesnexus filetypes [--json]List registered Frames/Nexus native file types.
addnexus add <name> [--version <version>]Add a project dependency.
removenexus remove <name>Remove a project dependency.
depsnexus deps [--json]Inspect project dependency state.
graphnexus graph [source] [--json]Emit the source/module dependency graph.
doctornexus doctorCheck toolchain/environment health.
explainnexus explain <NX-code>Explain a Nexus diagnostic code.
targetsnexus targets [--json]Show hosted and native Frames targets.
abinexus abi [--json]Show NexusABI/1 scalar/calling-convention guarantees.
cachenexus cache {status,clean}Inspect or clear the content-addressed build cache.
ide-infonexus ide-info [source] [--json]Emit machine-readable IDE/LSP-oriented source information.
verify-sdknexus verify-sdkRun the SDK verification front door.
auditnexus audit [source] [--deny-unsafe] [--deny-extern] [--json]Report unsafe/foreign-code boundaries.
safety-certnexus safety-cert [source] -o <report> [--strict]Produce a machine-readable safety certificate/report.
compare-safetynexus compare-safety [--json]Run selected Nexus/C++ safety comparison cases.
benchnexus bench [source] -n <iterations> [--warmup N] [--json]Benchmark a Nexus workload.
compare-cppnexus compare-cpp <program.nx> <program.cpp> [-O0..3] [-n N] [--warmup N] [--json]Compare matched Nexus and C++ runtime workloads.
compare-buildnexus compare-build <program.nx> <program.cpp> [-n N] [--json]Compare the Nexus cached rebuild path with direct C++ source recompilation.
claim-checknexus claim-check [-n N] [-o report.json]Run the bounded C++ challenger evidence gate.
export-cnexus export-c [source] -o <header.h>Export supported public Nexus APIs as a C header.
bindgen-cnexus bindgen-c <header.h> -o <bindings.nx> [--module <name>]Generate Nexus declarations from the supported C prototype subset.
cxx-bridgenexus cxx-bridge <header> -o <dir> [--compile]Generate a C++ bridge surface and optionally compile it.
debug-buildnexus debug-build [source] -o <output>Produce a debug-oriented build.
profilenexus profile [source] [-n N] [--json]Run the built-in profile workflow.
kernelnexus kernel {check,build,inspect} [source] [-o <output>]Check, build or inspect the strict Frames FKRN64 kernel profile.
link-objnexus link-obj <object> -o <output> [--entry <symbol>]Link a supported object into a Nexus/Frames output.
emit/verifynexus emit-c | emit-ir | verify-ir | emit-asm | emit-arm64 | native-checkCompiler-development front doors for generated C, NIR and native backend inspection.
emit-c, emit-ir, verify-ir, emit-asm, emit-arm64 and native-check are available for compiler/backend inspection. Use nexus <command> -h for the exact options in the installed SDK../nexus kernel check examples/frames_kernel/kernel.nx
./nexus kernel build examples/frames_kernel/kernel.nx -o FramesKernel.fkrn
./nexus kernel inspect FramesKernel.fkrnThe x86-64 kernel profile emits FKRN64/1 and enforces freestanding restrictions. Hosted allocation, normal hosted printing and async facilities are rejected in kernel-profile code. The SDK also carries Frames Kernel ABI and FKRN format documentation in the reference library below.
./nexus verify-sdk
./nexus claim-check -n 3 -o claim.json
./nexus compare-cpp benchmarks/cpp-compare/loop.nx benchmarks/cpp-compare/loop.cpp -O3 -n 5 --json
./nexus compare-build benchmarks/cpp-compare/loop.nx benchmarks/cpp-compare/loop.cpp -n 5 --json
./tools/test-sdk.shIn the checked local eight-workload C++ corpus, the Nexus/C++ median-runtime geometric mean is approximately 0.732 and the worst individual workload ratio approximately 1.127; the configured gates pass. This is a scoped result for the tested Linux x86-64 host/corpus—not a claim that every Nexus program is faster than every C++ program.
The external certification foundation produces NexusExternalCertificationLane/1 records and a NexusExternalCertificationAggregate/1 result. All required lanes must point to the same canonical tree hash.
The website package preserves the SDK's source documentation alongside this integrated guide.