LEARN HXN
Learn hxn by example
Short Rust and Haxe tutorials. Build a library, pass data, handle callbacks and deliver asynchronous results.
Create, run and package
Use the CLI to build your first library, compare runtimes and share a haxelib.
02 / Build · Wasm · MobileBuild for other targets
Build native, wasm and mobile bindings, then add each platform to one haxelib package.
03 / Records · Collections · ErrorsPass data and handle errors
Use records, enums, sets and tuples from Haxe, then catch a typed Rust error.
04 / Callbacks · Bytes · OwnershipCall Haxe from Rust
Paint a picture with a Haxe function and let callback exceptions reach the caller.
05 / Futures · Streams · SignalsWork with asynchronous results
Await a future, read a stream and update a reactive value from Rust.
Run the examples
For the API tutorials, use the current examples and CLI from the same checkout. Install Rust, Haxe and a runtime first; hxn doctor checks the tools.
git clone https://github.com/hx-n/hxn.git
cd hxn
cargo install --path crates/hxn-cli
hxn doctor
Each API tutorial shows excerpts from an existing program and links to its complete source. Run commands start at the repository root.