Open Manual

Examples

The checkout keeps runnable examples under etc/labs/ and focused runtime checks under etc/tests/.

Prerequisites: an installed Nytrix compiler; repository checks require the checkout and build tools.

Runnable Projects

AreaFiles
Terminalconway.ny, matrix.ny, ant.ny
OSargs.ny, server.ny, ffi.ny, sound.ny
UIterm.ny, input.ny, monitor.ny, engine.ny, editor.ny

Run one directly:

ny etc/labs/conway.ny

Build a native executable:

ny --output=build/conway etc/labs/conway.ny

Build the browser Wasm runner:

./make web-demos

The generated build/web/demos/index.html is a compact WebGL-backed wasm runner. Load a .wasm file from the page, or add explicit browser-ready entries to etc/assets/website/wasm/demos.json.

Focused Checks

Focused checks under etc/tests/ exercise one language surface or runtime boundary in isolation:

TopicFiles
ADTs and matchingadt.nshape, match.nshape
Concurrency and threadsconcurrency.nshape, thread.nshape
Comptimecomptime.nshape, table.nshape
Native boundaryffi.nshape, extern.nshape, asm.nshape
Ownership and safetyownership.nshape, safe.nshape, memory.nshape

Run a focused test by pattern:

ny test --pattern comptime
ny test --pattern ownership

Benchmarks

Bench examples live under etc/tests/bench/. The .nshape files are harness fixtures, not standalone Nytrix programs. Run them through the benchmark runner:

ny perf
ny test --pattern sieve

Use the benchmark guide for compiler flags, warmups, checksums, and comparative measurements; a single fixture run is only a correctness check.

Next: