Open Manual

<!-- nytrix-doc: {"audience":"user","featured":true,"group":"learn","order":200,"summary":"Compiling, testing, and debugging Nytrix for WebAssembly and modern web browsers."} -->

Web & WebAssembly Guide

Nytrix supports compiling to standalone WebAssembly and executing directly in browser environments.

Web Tooling & Commands

# Run the complete browser test suite
./make web-test

# Build WebAssembly demonstration bundles
./make web-demos

# Validate web runtime contracts
./make web-check

# Compile standalone WebAssembly binary
./make wasm

Runtime Contracts

Nytrix provides two distinct WebAssembly compilation targets:

1. **wasm-bare**:

2. **wasm (Full Runtime)**:

Browser Test Configuration (tests.json)

Browser test fixtures are declared in etc/tests/native/web/tests.json:

{
  "engine": "wasm",
  "fixture": "etc/tests/native/web/canvas_basic.ny",
  "marker": "RENDER_OK",
  "virtual_time_budget_ms": 5000
}

Key Configuration Fields:

Headless Browser Debugging