This page describes how Haxe stdlib support works on the Elixir target, and what is currently:
- Overridden / implemented by this repo (because upstream breaks or is non-idiomatic)
- Provided by the upstream Haxe stdlib (and generally expected to work)
- Not implemented yet (mostly
sys.*gaps or “native host” APIs that need BEAM mappings)
This matrix is intentionally practical. For toolchain versions, see docs/06-guides/SUPPORT_MATRIX.md.
Reflaxe.Elixir does not ship a full fork of Haxe stdlib.
Instead:
- Most modules come from the official Haxe stdlib.
- We provide selective overrides in
std/when needed. - Some additional modules exist under
std/haxe/**andstd/sys/**to provide BEAM-backed behavior.
The canonical local audit command is:
scripts/stdlib-parity-report.sh --reference /path/to/haxe/stdCI parity drift guard (no external reference checkout required):
npm run guard:stdlib-parityThese modules are implemented/overridden in this repo (and covered by snapshot tests where relevant):
Top-level:
ArrayDateDateToolsERegIntIteratorLambdaListMapMathReflectStdStringStringBufStringToolsSysTypeUInt
haxe.*:
haxe.Loghaxe.ds.BalancedTreehaxe.ds.EnumValueMap(bootstrap-safe override undersrc/haxe/ds)haxe.ds.Optionhaxe.format.JsonPrinterhaxe.io.BufferInputhaxe.io.Byteshaxe.io.BytesBufferhaxe.io.BytesDatahaxe.io.BytesInputhaxe.io.BytesOutputhaxe.io.Encodinghaxe.io.Eofhaxe.io.FPHelperhaxe.io.Inputhaxe.io.Outputhaxe.iterators.ArrayIteratorhaxe.iterators.ArrayKeyValueIteratorhaxe.iterators.MapKeyValueIterator
sys.* (BEAM mappings):
sys.FileStatsys.FileSystemsys.io.Filesys.io.FileInputsys.io.FileOutputsys.io.Processsys.io.FileSeek
Notes:
- Iterator modules (
haxe.iterators.ArrayIterator,haxe.iterators.MapKeyValueIterator) now have canonical Elixir-target runtime implementations understd/haxe/iterators/*.cross.hxand are no longer transformer-only runtime stubs. - The AST pipeline still optimizes most loop patterns to idiomatic
Enum.*; runtime iterators are primarily for manual iterator usage and stdlib/runtime compatibility. - Some exist to avoid invalid Elixir from upstream inline patterns (notably parts of
haxe.io).
These are “extra” modules provided by the library (not present in upstream Haxe stdlib), typically used by Reflaxe.Elixir features or example apps:
haxe.ds.OptionToolshaxe.functional.Result/haxe.functional.ResultToolshaxe.test.Assert/haxe.test.ExUnit(Haxe-authored ExUnit support)haxe.validation.*(example-facing typed validation helpers)
Most of the remaining Haxe stdlib is used as-is from the installed Haxe toolchain. In practice, this works well for:
- pure functional-ish code (pattern matching, enums, maps, arrays)
- many
haxe.*utilities that don’t rely on target-specific host APIs
If a given upstream std module produces invalid/non-idiomatic Elixir, it becomes a candidate for an override.
Top-level std modules that exist upstream but are not yet overridden/validated specifically for Elixir:
Xml(XML parsing/printing)UnicodeString, etc.
sys.* surfaces that still need BEAM mapping (not exhaustive):
sys.net.*(Socket/UdpSocket/Host)sys.thread.*(EventLoop, pools)sys.ssl.*sys.db.*
Track the ongoing parity roadmap in bd:
haxe.elixir-hm47(stdlib parity roadmap)