<!-- nytrix-doc: {"audience":"user","featured":true,"group":"learn","order":20,"summary":"Practical Nytrix examples covering expressions, modules, native builds, and everyday patterns."} -->
Examples
The checkout keeps runnable examples under etc/projects/ and focused runtime
checks under etc/tests/.
Runnable Projects
| Area | Files |
| Terminal | conway.ny, matrix.ny, ant.ny |
| OS | args.ny, server.ny, ffi.ny, sound.ny |
| UI | term.ny, input.ny, monitor.ny, engine.ny, editor.ny |
Run one directly:
ny etc/projects/os/conway.ny
Build a native executable:
ny -o build/conway etc/projects/os/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
Runtime checks under etc/tests/runtime/ are the quickest way to inspect one
language surface in isolation:
| Topic | Files |
| ADTs and matching | adt.ny, match.ny |
| Concurrency and threads | concurrency.ny, thread.ny |
| Comptime | comptime.ny, table.ny |
| Native boundary | ffi.ny, extern.ny, asm.ny |
| Ownership and safety | ownership.ny, safe.ny, memory.ny |
Run a focused test by pattern:
ny test --pattern comptime
ny test --pattern ownership
Benchmarks
Bench examples live under etc/tests/bench/. Use them for rough comparisons:
ny perf
ny -o build/cache/bench/sieve etc/tests/bench/sieve.nshape
Related
- Start for the first file.
- Programs for script and module shape.
- Testing for test commands.
- Performance for measurement discipline.