Arx is a new programming language that uses the power of LLVM to provide a multi-architecture machine target code generation. Arx aims to provide a direct interface to Apache Arrow.
Arx is a prototype that should replace the current Arx compiler in c++.
- Free software: Apache Software License 2.0
- Documentation: https://arxlang.org
If you want more information about ArxLang, please check the original project in c++: https://github.com/arxlang/arx
Arx supports explicit executable link modes:
arx program.x --link-mode auto # default, use toolchain default
arx program.x --link-mode pie # force PIE executable
arx program.x --link-mode no-pie # force non-PIE executableIf you hit an error like:
relocation R_X86_64_32 ... can not be used when making a PIE object
use:
arx program.x --link-mode no-pieThis typically happens on environments where the linker defaults to PIE while objects were not compiled in a PIE-compatible mode.
Arx now supports fatal assertion statements in the language surface:
fn test_add() -> none:
assert 1 + 1 == 2
assert 2 + 2 == 4, "2 + 2 should be 4"
You can run compiled tests with the new arx test subcommand:
arx test
arx test tests/test_add.x --list
arx test -k fibonacci
arx test -x
arx test --keep-artifacts
arx test --exclude "tests/slow_*.x"By default the runner searches tests/ for files matching test_*.x, discovers
zero-argument test_* functions that return none, and executes each test in
its own compiled subprocess. Test identifiers use the cwd-relative path of the
source file (without the .x suffix) joined to the function name via ::, for
example tests/test_add::test_add, so same-named files in parallel directories
stay distinct.
You can override discovery from .arxproject.toml:
[tests]
paths = ["tests", "integration"]
exclude = ["tests/experimental_*.x"]
file_pattern = "test_*.x"
function_pattern = "test_*"CLI flags always win over [tests] settings. In v1, shared top-level support is
intentionally narrow: imports, extern declarations, class declarations, and
helper functions are preserved, while module-scope variable declarations and
other top-level executable code are not supported yet.