Skip to main content

IRx

IRx is the semantic-analysis, LLVM-lowering, and native-runtime layer of the ArxLang ecosystem. The PyPI distribution is pyirx; the Python import is irx.

Status: functional experimental backend. It supports substantial compiler and runtime flows but does not lower every ASTx node.

Responsibilities

  • analyze ASTx modules and attach resolved semantic sidecars
  • validate types, calls, imports, templates, classes, and FFI boundaries
  • lower supported nodes to LLVM IR with llvmlite
  • emit objects, link executables with Clang, and run built artifacts
  • report structured semantic, lowering, native-compile, and link diagnostics
  • activate native runtime features only when a compilation unit needs them

Native Apache Arrow runtime

IRx integrates Apache Arrow through native C++ runtime code and opaque C ABI handles. Current layers include:

  • primitive Arrow arrays and Arrow C Data interoperability
  • homogeneous fixed-width arrow::Tensor values
  • DataFrames backed by arrow::Table
  • Series backed by arrow::ChunkedArray
  • RecordBatch schemas, builders, nullable data, and Arrow IPC streams

The RecordBatch API interoperates with PyArrow and supports signed/unsigned integers, floats, booleans, UTF-8 and large UTF-8 strings, dates, timestamps, and times. pyarrow and arx-arrowcpp-sources provide the Arrow C++ build and link metadata.

Install

pip install pyirx

Native builds require an LLVM/Clang-compatible toolchain. Arrow runtime features require a C++ compiler.

Translate ASTx to LLVM IR

import astx

from irx.builder import Builder

builder = Builder()
module = builder.module()

body = astx.Block()
body.append(astx.FunctionReturn(astx.LiteralInt32(0)))
prototype = astx.FunctionPrototype(
    name="main",
    args=astx.Arguments(),
    return_type=astx.Int32(),
)
module.block.append(astx.FunctionDef(prototype=prototype, body=body))

llvm_ir = builder.translate(module)
print(llvm_ir)

translate() returns LLVM IR text without linking. Use build() to emit and link a native artifact, then run() to execute the built program.

RecordBatch API

The direct Python API lives in irx.record_batch. In a source checkout, build its standalone shared library before first use:

python -c "from irx.builder.runtime.record_batch import build_record_batch_shared_library; build_record_batch_shared_library()"
from irx.record_batch import (
    IrxColumnType,
    RecordBatchBuilder,
    RecordBatchSchema,
)

schema = RecordBatchSchema()
schema.add_field("id", IrxColumnType.INT32, nullable=False)

builder = RecordBatchBuilder(schema)
builder.append_int32(0, 42)
batch = builder.finish()

assert batch.get_int32(0, 0) == 42

batch.release()
builder.release()
schema.release()

Runtime features

Registered features include libc, libm, assertions, buffer, list, array, tensor, dataframe, and record_batch. Features may contribute external symbols, C/C++ sources, object files, libraries, and linker flags.

Boundaries

IRx does not parse Arx/AIX source and does not define high-level query or DataFrame language semantics. Arrow C++ stays behind the native runtime; LLVM does not encode Arrow object layouts directly.

Documentation: https://arxlang.org/irx/

License: Apache-2.0.

Metadata

Release files for pyirx 1.28.0

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

Source distribution (sdist)

Source distribution for pyirx 1.28.0
File Size Uploaded Provenance Actions
pyirx-1.28.0.tar.gz 439.4 kB Without provenance Details for pyirx-1.28.0.tar.gz

Built distribution (wheel)

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

Total release size: 994.3 kB

Release files / pyirx-1.28.0.tar.gz

Download URL pyirx-1.28.0.tar.gz
Size 439.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b0887d38af50665fc59db127c6f25c149b072c427699e4660ae2c88034c98e06
BLAKE2b-256 checksum
How to use checksums
195ead9cd8c74856eaedf3a9670b835618bd3d881e6d5f0caac1986b208234b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.11.18 Linux/7.0.0-1019-azure

Release files / pyirx-1.28.0-py3-none-any.whl

Download URL pyirx-1.28.0-py3-none-any.whl
Size 554.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e175cdf2ba421f40457ba559a973d66326c7ef1f6e36ac18fba49c116ec663d
BLAKE2b-256 checksum
How to use checksums
0f18672da5508d63e49553fde8d4d8a7afb483368e980fcc1df469ebba63ff3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.11.18 Linux/7.0.0-1019-azure

Security for pyirx 1.28.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.28.0 This release

2 release files No provenance

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