Open Manual

Nytrix documentation

The docs split into two layers:

Use the generated reference for signatures, exports, module docstrings, and

keyword search:

ny doc search json
ny doc search --symbols recvuntil
ny doc get std.math.parse.data.json

Start here

Start with the task. Use spec/ when you need a rule or diagnostic meaning.

TaskStart hereThen use
Run one filelearn/start.mdlearn/tooling.md
Understand source shapelearn/programs.mdspec/source.md, spec/modules.md
Find a stdlib modulelearn/library.mdny doc search, ny doc get
Diagnose a failurelearn/troubleshooting.mdspec/errors.md, ny --diag-rich
Check safety ruleslearn/tooling.mdspec/runtime.md, spec/types.md
Cross a native boundarylearn/native.mdspec/native.md
Measure performancelearn/performance.mdny perf compare

Language

Nytrix runs source files. A file can declare a module and export names for

other files. Imports name their modules. Standard-library APIs live under their

owning modules; ny doc confirms names and signatures.

Core surface: native binaries, typed bindings, ADTs/generics, async tasks,

comptime tables/templates/checks, native layouts, C header imports, inline

assembly, default compile-time type checks, and opt-in ownership/raw-memory

diagnostics.

Native Definition

A feature is truly native only when it works in both the NYIR VM and native codegen, without AST fallback or external compiler infrastructure. LLVM and libclang can be useful references or fallbacks, but they are not the compiler’s core.

Learn guides

PageUse it for
start.mdToolchain check, first program, API search, diagnostics.
programs.mdScripts, modules, imports, entrypoints, exported names.
repl.mdInteractive probes, paste behavior, completion, REPL-to-file handoff.
examples.mdSmall complete programs and project entry points.
ui.mdWindows, resize-safe frame loops, drawing, text, textures, input, 3D start.
library.mdFacades and domain choice before opening generated API pages.
tooling.mdCommand forms, docs generation, formatting, tests, audits.
networking.mdRequests, local servers, sockets, tubes, transport logs.
packages.mdManifests, sources, package repos, install roots, lockfiles.
performance.mdTiming, profiling, cache discipline, report shape.
metaprogramming.mdCompile-time tables, templates, generated modules.
native.mdLayouts, externs, #include, pointers, handles, strings, ownership.
testing.mdExecutable checks and test command shape.

Specification

PageScope
spec/source.mdSource units, imports, modules, script execution.
spec/imports.mdImport forms, aliases, selected names, resolution, package imports.
spec/modules.mdModule declarations, export lists, grouped modules, generated modules.
spec/values.mdLiterals, strings, containers, receiver methods.
spec/functions.mdBindings, parameters, blocks, returns, lambdas, attributes, contracts.
spec/types.mdType expressions, generics, ADTs, typed bindings, default checks.
spec/operators.mdArithmetic, power, comparison, logic, bitwise, ternary, coalescing, calls.
spec/patterns.mdcase and match patterns, wildcard arms, dispatch clarity.
spec/control-flow.mdConditionals, loops, case, match, try, defer, with.
spec/errors.mdAssertions, panics, result shape, diagnostics.
spec/comptime.mdCompile-time blocks, tables, matches, templates, generated modules.
spec/native.mdLayouts, externs, #include, pointers, handles, FFI boundaries.
spec/runtime.mdExecution modes, ownership, cleanup, async/concurrency, effects.
spec/syntax.mdLexical forms and grammar-shaped source spellings.

Core commands

./make doctor
./make doctor --install
./make env
./make targets
ny file.ny
ny -c 'print(1 + 1)'
ny -run file.ny
ny -o app file.ny
ny fmt --check file.ny
ny doc search [--docs|--symbols] query
ny doc get query
ny pkg repo list
ny test

Native -o builds use the optimized native profile. JIT and REPL paths favor

edit latency. Use -O3 and --profile=peak for peak-speed measurements.

Conventions

Fenced ny blocks contain Nytrix source. Nearby text names required local

services, files, or packages. Shell commands use bash; manifests and wire

formats use their own fences. Silent success means all assertions passed.

Examples use explicit imports and small assertions. Spec pages use exact forms

and behavior tables. If an example depends on a local server, native library,

network service, or fixture, the text names it before the code block.