Skip to main content

Arx language compiler

arxlang is the main language frontend in the ArxLang ecosystem. It provides the arx Python package and arx command for lexing, parsing, inspecting, and compiling .x source files.

Arx emits ASTx nodes and delegates semantic analysis, LLVM lowering, native runtime features, and linking to IRx.

Status: functional prototype. Supported behavior is tested, but the language and APIs are not yet production-stable.

Native Apache Arrow collections

Arx exposes data-oriented types backed by IRx's native Arrow C++ runtime:

  • tensor[T, D0, ...] uses arrow::Tensor
  • dataframe[name: T, ...] uses arrow::Table
  • series[T] uses arrow::ChunkedArray
fn main() -> i32:
  var grid: tensor[i32, 2, 2] = [[1, 2], [3, 4]]
  var rows: dataframe[id: i32, score: f64] = dataframe({
    id: [1, 2, 3],
    score: [0.5, 0.8, 1.0],
  })
  return cast(rows.nrows(), i32)

Current Tensor elements are fixed-width signed integers and floats. Current DataFrame columns are fixed-width numeric values or bool. Runtime-shaped Tensor and runtime-schema DataFrame types are parameter-only, and their dynamic index/column access remains deferred.

Install

pip install arxlang
arx --version

Building executables requires LLVM/Clang-compatible tools. Arrow-backed features also require a C++ compiler.

CLI

arx --show-tokens program.x
arx --show-ast program.x
arx --show-llvm-ir program.x
arx program.x --output-file program
arx --run program.x
arx test

Use --link-mode auto, pie, or no-pie when a platform requires an explicit linking mode.

Implemented language areas

  • explicit scalar, collection, class, and finite-union annotations
  • functions, trailing defaults, externs, and templates
  • mutable variables, assignments, casts, isinstance, and type
  • if/else, while, count loops, and list-valued for ... in
  • absolute, relative, grouped, namespace, installed-package, and stdlib imports
  • classes, inheritance, fields, methods, modifiers, and default construction
  • lists, builtin range, Tensors, DataFrames, and Series
  • Douki module/class/function/method docstrings
  • fatal assertions and compiled tests

Boundaries

Arx owns source syntax and CLI behavior. It does not define new AST node types or implement feature lowering locally: those responsibilities belong to ASTx and IRx respectively.

Documentation: https://arxlang.org

License: Apache-2.0.

Metadata

Release files for arxlang 1.24.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arxlang 1.24.1
File Size Uploaded
arxlang-1.24.1.tar.gz 66.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arxlang 1.24.1
File Interpreter ABI Platform
arxlang-1.24.1-py3-none-any.whl Python 3 none any Details

Total release size: 146.8 kB

Release files / arxlang-1.24.1.tar.gz

Download URL arxlang-1.24.1.tar.gz
Size 66.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fa6a0e8b3424f813ede26f976694a8c7083ebab027e95f9acfc3110f8722351e
BLAKE2b-256 checksum
How to use checksums
1276aab44c527ab273fd1baf65d864afcfbfb89b4793221c028635f40a71dee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1020-azure

Release files / arxlang-1.24.1-py3-none-any.whl

Download URL arxlang-1.24.1-py3-none-any.whl
Size 79.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb75cf64adf0b0312560bdab49f205dcf8964a874bfe94e68e1a7e5223159fd8
BLAKE2b-256 checksum
How to use checksums
7521db681a6836f4894bd958f5710bd90eb369e265dd4080993ecedad4bd4962
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1020-azure

Release history Release notifications | RSS feed

This release

1.24.1 This release

2 release files

1.23.1

2 release files

1.23.0

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.20.0

2 release files

1.19.2

2 release files

1.19.1

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page