Nyx CLI Reference & Binary Armor Hardening Guide (v0.53.0)
The Nyx Command-Line Interface (nyx.exe / nyxc) is the official 6-phase native compiler, runner, optimizer, and security hardening engine for the sovereign systems programming ecosystem.
1 Clone the Official Public Distribution
The repository includes the precompiled standalone native compiler at bin/nyx.exe (3.04 MB) with zero external Rust or Python runtime dependencies:
2 Instant Out-of-the-Box Execution
Compile and execute any .nyx program in milliseconds:
3 Add to User PATH (Optional)
In PowerShell for the current session:
Full Compiler Command-Line Flags Matrix
The complete set of compilation, code emission, optimization, and security switches:
| Flag & Syntax | Description | Example Usage |
|---|---|---|
-i, --input <file.nyx> |
Primary entry source file to compile. | nyx -i main.nyx |
-o, --output <file.exe> |
Specify target binary or output library path. | nyx -i app.nyx -o app.exe |
-r, --run |
Compile and execute immediately in zero-GC region memory. | nyx -i app.nyx -r |
-O<0|1|2|3|s> |
Optimization level: 0 (debug), 1, 2 (default), 3 (max), or 's' (binary size). | nyx -i app.nyx -o app.exe -O 3 |
--emit-c |
Emit transpiled intermediate ISO C99/C11 code for inspection and auditing. | nyx -i app.nyx --emit-c |
-S, --emit-asm |
Emit native annotated x86_64/ARM machine assembly with instruction comments. | nyx -i app.nyx -S |
--emit-llvm |
Emit LLVM Intermediate Representation (.ll). |
nyx -i app.nyx --emit-llvm |
-g, --debug |
Generate DWARF/PDB debug symbols mapping debugger to .nyx source lines. |
nyx -i app.nyx -g |
-j, --jobs <N> |
Number of parallel compilation worker threads (default: 1). | nyx -i app.nyx -j 8 |
-d, --dialect <name> |
Select safety or natural language dialect (base, zephaniah, havilah, jude, yoruba, hausa, igbo, pidgin, auto). |
nyx -i app.nyx -d zephaniah |
--target <triple> |
Cross-compilation target (e.g. x86_64-pc-windows-msvc, arm-cortex-m4, aarch64-linux-gnu). |
nyx -i firmware.nyx --target arm-cortex-m4 |
--strip |
Strips all symbol tables, debug relocations, and section headers to defeat Ghidra/IDA Pro. | nyx -i app.nyx -o app.exe -O 3 --strip |
--harden |
Activates full Binary Armor: VM bytecode virtualization, MBA polynomial disguise, and anti-debug guards. | nyx -i app.nyx -o app.exe -O 3 --harden |
--seed <hex> |
Provides a 64-bit entropy seed to randomize VM opcodes and instruction order per build. | nyx -i app.nyx --harden --seed 0x5A879E19 |
--harden-scope <pat> |
Scopes virtualization specifically to critical crypto or license routines while keeping hot loops native. | nyx -i app.nyx --harden-scope "std::sec::*" |
--emit-sbom |
Generates an automated Software Bill of Materials (CycloneDX/SPDX JSON) with SHA-256 binary provenance hashes. | nyx -i app.nyx --emit-sbom |
--verify |
Run compile-time Jude SMT BitVector verification against formal contracts and post-conditions. | nyx -i contract.nyx --verify |
nyx lsp |
Launch background JSON-RPC 2.0 Language Server with #comptime fuel limit for IDE autocompletion and diagnostics. | nyx lsp |
nyx doc <target> |
Generate a standalone zero-GC API documentation site with instant search indexing into docs/api/. |
nyx doc . -o docs/api |
nyx pkg <init|install|list> |
Sovereign package manager for Nyx libraries and localized dialect modules. | nyx pkg install @nyx-yoruba |
nyx mobile <build|package> |
Compile native mobile artifacts for Nyx Mobile OS (.nyxapp), Android NDK (.apk), and iOS Metal (.ipa). |
nyx mobile package --target=apk |
nyx os <build|iso|kernel> |
Build bare-metal 64-bit NyxOS microkernels, sub-8ms Cloud Unikernels (ELF), or hybrid bootable ISO images. | nyx os build --target=unikernel |
-V, --version |
Print compiler toolchain version (nyx 0.54.0). |
nyx -V |
-h, --help |
Display CLI help documentation. | nyx -h |
🛡️ Compiling with Binary Armor & Tamper-Immune Security
When deploying proprietary algorithms, quant trading bots, firmware, or edge AI models into untrusted client environments, Nyx provides **Binary Armor**—a native security framework integrated directly into the toolchain and std/sec library to produce **executables that are mathematically difficult to reverse-engineer, decompile, or crack**.
1. VM Bytecode Virtualization
Translates sensitive functions into randomized, custom virtual opcodes executed by an in-memory interpreter, completely defeating linear Ghidra and IDA Pro disassemblers.
2. Higher-Order MBA Logic
Replaces linear arithmetic and conditions with Mixed Boolean-Arithmetic polynomial identities, rendering automated Z3/SMT theorem provers computationally infeasible.
3. Silicon SRAM PUF Binding
Binds executable decryption to the unique startup noise of the physical silicon chip, making the binary impossible to clone onto unauthorized hardware.
4. Inception Anti-Debug Guards
Monitors hardware debug registers (DR0–DR7), RDTSC CPU cycle timing jitter, and memory integrity checksums to terminate instantly upon debugger attachment.
5. In-Memory Tensor Cloaking
Decrypts static keys, proprietary algorithms, and AI model weights only inside volatile CPU registers during execution, immediately zeroizing to prevent memory dumps.
6. ASIL-D Reproducibility
Deterministic PRNG seed engine producing bit-for-bit verifiable hardened binaries with cryptographic audit trails for ISO 26262 certification.
1. Security Hardening CLI Compilation Examples
A. Tier 1: Baseline Release Stripping (Max Optimization + Symbol Stripping + Linear Dialect):
B. Tier 2: Full Compiler Binary Armor (VM Virtualization + MBA + Session Randomization):
B. Using Dynamic Bytecode Virtualization (std/sec/vm_obfuscator.nyx):
import std.sec.vm_obfuscator;
pub fn execute_hardened_license_check(seed: u64, candidate_token: u64) -> bool {
// 1. Initialize session-randomized opcode mapping
let opcode_table = vm_obfuscator::VmOpcodeTable::new(seed);
// 2. Instantiate zero-GC virtual execution frame
let mut vm = vm_obfuscator::VmRuntimeState::new();
vm.regs[vm_obfuscator::VREG_R1] = candidate_token;
// 3. Execute hardened bytecode program
let result = vm.execute(&BYTECODE_PROGRAM, &opcode_table);
return result == 0x5A879E19A64E2B1F && !vm.tamper_detected;
}C. In-Memory Secret Shield (std/sec/secret_shield.nyx):
import std.sec.secret_shield;
// Guarantees zero plaintext in RAM; decodes directly inside volatile execution frame
let shield = SecretShield::new(master_key, seed);
shield.decloak_jit(&cloaked_payload, &mut volatile_dest, salt);
// volatile_dest is zeroized immediately upon scope exit via O(1) region arenaD. Hardware Silicon PUF Binding (std/sec/puf_binding.nyx):
import std.sec.puf_binding;
// Reconstructs cryptographic key directly from physical silicon SRAM power-up entropy
let puf_engine = PufBindingEngine::new(0, 0x104A, &SALT_BYTES);
let derived_key = puf_engine.reconstruct_key(sram_sample, &GOLDEN_HELPER_DATA);
let is_authentic = puf_engine.verify_silicon_identity(&derived_key, &ENROLLED_CHIP_DIGEST);Nyx Dialects & Formal Safety Engines
| Dialect Flag | Safety Guarantees & Capabilities | Ideal For |
|---|---|---|
-d base |
Automatic zero-GC region inference with $O(1)$ bump frames and zero annotations. | General systems, web services, GUI apps, quantitative trading. |
-d zephaniah |
Gradual affine ownership tracking for cross-thread shared mutable memory. | High-concurrency pipelines, multi-producer actor swarms. |
-d havilah |
Linear capability tokens and higher RAII for physical hardware lifecycle tracking. | Aerospace, robotics DMA buffers, GPU hardware pipelines. |
-d jude |
Compile-time SMT/Z3 formal mathematical verification of bounds and invariants. | Cryptographic protocols, mission-critical kernels, flight controllers. |
-d yoruba |
Native African language systems dialect (Yoruba keywords, syntax, and types). | Localized sovereign systems programming & STEM education. |
-d hausa |
Native African language systems dialect (Hausa keywords, syntax, and types). | Localized sovereign systems programming & STEM education. |
-d igbo |
Native African language systems dialect (Igbo keywords, syntax, and types). | Localized sovereign systems programming & STEM education. |