Haxe 4.3.7 -> Rust target built on Reflaxe.
This project lets you write Haxe and ship native Rust binaries, with a path for both Haxe-first and Rust-first teams.
- New here: Start Here guide
- Building async apps: Async/Await preview guide
- Production rollout: Production Readiness guide
- Post-1.0 quality cadence: Weekly CI Evidence runbook
- Cross-platform sys risk tracking: Sys Regression Watchlist
- Fast edit-compile-run loop: Dev Watcher guide
- Full docs map: Documentation Index
- Install dependencies (toolchain is pinned via lix):
npm install- Compile and run the hello example:
cd examples/hello
npx haxe compile.hxml
(cd out && cargo run -q)- Run snapshot tests:
npm test- Run the CI-style local harness (snapshots + examples):
npm run test:allInstall watcher engine once:
- Homebrew:
brew install watchexec - Cargo:
cargo install watchexec-cli
Then run:
npm run dev:watch -- --hxml examples/hello/compile.hxmlMore usage options: Dev Watcher guide.
Use -D reflaxe_rust_profile=portable|idiomatic|rusty.
| Profile | Best for | What you get |
|---|---|---|
portable (default) |
Haxe-first teams | Stable Haxe semantics and portability-first behavior |
idiomatic |
Teams that want cleaner Rust output without semantic shifts | Same behavior as portable, cleaner emitted Rust |
rusty |
Rust-aware teams | Rust-first APIs and borrow/ownership-oriented surface |
Read more: Profiles guide and Rusty profile details.
- hello
- async_retry_pipeline
- classes
- serde_json
- sys_file_io
- sys_net_loopback
- sys_process
- sys_thread_smoke
- thread_pool_smoke
- tui_todo
- Watch mode for local development:
npm run dev:watch -- --hxml examples/hello/compile.hxml - Refresh tracker-backed status docs:
npm run docs:sync:progress - Verify tracker-backed status docs are in sync:
npm run docs:check:progress - Snapshot tests:
bash test/run-snapshots.sh - Upstream stdlib sweep:
bash test/run-upstream-stdlib-sweep.sh - Windows-safe smoke subset:
bash scripts/ci/windows-smoke.sh - Full local CI equivalent:
bash scripts/ci/local.sh - Clean generated artifacts:
npm run clean:artifacts:all
- Live tracker: Compiler Progress Tracker
- Vision vs implementation: Reality check
- Execution playbook: Road to 1.0
- Weekly post-1.0 operations: Weekly CI Evidence
- Sys regression intake: Cross-Platform Watchlist
- Technical support matrix: v1 scope
-D rust_output=out- output directory for the generated Cargo project-D rust_no_build/-D rust_codegen_only- codegen only, skip Cargo build-D rust_build_release/-D rust_release- release build mode-D rust_target=<triple>- pass target triple to Cargo-D rust_idiomatic- alias for-D reflaxe_rust_profile=idiomatic-D reflaxe_rust_profile=rusty- enable Rust-first profile surfaces-D rust_async_preview- enable Rusty async/await preview (docs/async-await.md)-D rustfmt- runcargo fmton generated output (best effort)
Full list: Defines reference.
Preferred order:
- Pure Haxe + runtime/std APIs
- Typed externs and metadata (
@:native,@:rustCargo,@:rustExtraSrc) - Framework wrappers around hand-written Rust modules
- Raw
__rust__only when necessary
Read: Interop guide and Workflow guide.
- Toolchain install details: Install via lix
- Release process: Release docs