minarrow
Arrow-compatible data that moves cleanly between Rust and Python, stays ready for SIMD, and plugs into the rest of the Python data ecosystem.
Documentation: minarrow.com
minarrow is a compact Python interface over Minarrow Rust.
It gives Rust and Python the same columnar data model, with Arrow-compatible memory layouts and 64-byte-aligned buffers. Data produced in Rust can be exposed directly to Python, operated on by native SIMD kernels, and passed to PyArrow, Polars, DuckDB and other Arrow-aware libraries through the Arrow PyCapsule interface.
import minarrow as ma
table = ma.Table(
{
"id": [1, 2, 3],
"price": [9.5, 10.0, 11.2],
},
name="prices",
)
series = table["price"].to_polars()
relation = table.to_duckdb()
Minarrow is useful when:
- Data is produced or processed in Rust and consumed in Python
- Downstream libraries such as Polars benefit from SIMD-compatible, 64-byte-aligned memory
- Arrow interoperability is required without taking an internal dependency on PyArrow
- A small set of typed containers is preferable to a large object hierarchy
- Higher-level computation is delegated to Polars, DuckDB, PyArrow or another execution engine
The columnar API centres on four containers:
Arrayfor a single typed columnTablefor a fixed set of equal-length columnsChunkedArrayfor one logical column split across multiple chunksChunkedTablefor a sequence of table batches
Together, they cover the common Arrow tabular data model. Nested Struct and List types are not currently supported.
The tensor API adds three focused containers:
NdArrayfor contiguous or zero-copy windowed f32/f64 dataChunkedNdArrayfor compatibleNdArraypieces backed by RustSuperNdArrayXArrayfor named dimensions and coordinate-based selection over anNdArray
They provide storage, indexing, selection, and DLPack interchange. NdArray
and XArray expose one tensor directly; each ChunkedNdArray chunk is a
separate NdArray DLPack producer with its own data pointer. Numerical
algorithms, statistics, and general tensor computation remain the job of
NumPy, PyTorch, JAX, or another execution library.
Why not just use PyArrow?
PyArrow is an excellent Arrow implementation, but it solves a different problem. It brings the full Arrow C++ runtime into Python, together with a large type system, compute engine, file formats and dataset APIs.
Minarrow is for applications where the important path is Rust -> Python -> native analytics.
It uses the same Minarrow data model on both sides of the Rust–Python boundary, allocates supported buffers at 64-byte alignment (PyArrow only guarantees 8-byte), and exposes them through the Arrow PyCapsule interface. Rust can produce the data, Python can inspect and compose it, and Polars, DuckDB, PyArrow or a custom native kernel can consume it without an intermediate serialisation step.
For example, a Rust service can use Lightstream to receive a network feed directly into 64-byte-aligned Arrow buffers, expose those buffers to Python through Minarrow, and continue processing them with Python, native SIMD kernels, or machine-learning libraries without serialising or rebuilding the dataset.
| Minarrow | PyArrow | |
|---|---|---|
| Rust–Python data model | Native Minarrow types across both runtimes | Rust integration through Arrow interchange interfaces |
| Host runtime | Rust, embedded in the application service | Arrow C++ runtime loaded into Python |
| Buffer alignment | 64-byte aligned for Minarrow-backed buffers | 8-byte Arrow alignment guarantee |
| Python API | Focused columnar and tensor containers | Full Arrow type and container hierarchy |
| Native SIMD use | Buffers are ready for aligned SIMD kernels | Consumers must inspect alignment or realign the data |
| Runtime role | Application data model, interchange and composition | Arrow compute, storage and dataset platform |
| Ecosystem integration | Arrow PyCapsule and direct runtime bridges | PyArrow APIs and Arrow interoperability |
| Dependency footprint | Focused Rust extension | Full Arrow C++ and Python distribution |
Minarrow avoids making PyArrow a required part of the data path. Applications can depend only on Minarrow, hand its objects directly to capsule-aware libraries, and introduce PyArrow only where its broader functionality is useful.
import minarrow as ma
table = ma.Table(
{
"id": [1, 2, 3],
"price": [9.5, 10.0, 11.2],
}
)
polars_frame = table.to_polars()
duckdb_relation = table.to_duckdb()
PyArrow remains fully interoperable:
import pyarrow as pa
arrow_table = pa.table(table)
minarrow_table = ma.Table.from_arrow(arrow_table)
Rust and Python share the same data model
Minarrow arrays and tables exist on both sides of the Rust–Python boundary.
Rust code can construct the data, perform native processing, and expose it to Python without first serialising it into another format. Python can then pass the same Arrow-compatible buffers into Polars, DuckDB, PyArrow or another capsule-aware library zero-copy.
This suits:
- Rust-based parsers and decoders
- Python extensions with columnar outputs
- Low-latency ingestion systems
- Scientific and simulation code
- Feature-generation pipelines
- Native analytics kernels
This pattern suits systems where Rust provides the production application, transport and data services, while Python delivers the intelligence layer.
SIMD-ready buffers
Minarrow allocates supported buffers on 64-byte boundaries, matching the alignment required by wide SIMD paths such as AVX2 and AVX-512.
For compatible workloads, this adds a low-latency layer of parallelism alongside standard multi-core execution:
- Native kernels can operate directly on the buffers without copying or realigning the data.
- The buffers remain in host memory and can be processed immediately by the CPU.
- GPUs offer greater peak throughput for sufficiently large, highly parallel workloads, but first require the data to be transferred into device memory.
- For smaller batches and latency-sensitive workloads, the transfer can take longer than the computation itself, making CPU SIMD the faster end-to-end path for many tabular workloads that require a rapid decision.
The alignment is preserved when Minarrow-owned data moves from Rust into Python. Python extensions and Arrow PyCapsule consumers can access the same underlying buffers and pass them directly to compatible native kernels.
By contrast, PyArrow guarantees 8-byte alignment rather than 64-byte alignment. A native kernel that requires 64-byte-aligned input may therefore need to copy the data into a new allocation before processing it. For small and latency-sensitive workloads, that copy can take longer than the SIMD calculation itself.
Small Python surface
Minarrow exposes one container per structural role rather than one Python class for every Arrow type.
array.dtype
array.dtype.group
array.bit_width
array.arrow_type
.dtype provides a compact application-level type, while .arrow_type retains the complete Arrow logical type.
Pluggable execution
Minarrow stores and exchanges columnar data. It does not attempt to replace a dataframe or query engine.
Use Minarrow for the Rust–Python boundary, then choose the execution engine appropriate to the workload:
polars_frame = table.to_polars()
duckdb_relation = table.to_duckdb()
arrow_table = table.to_arrow()
This keeps the data layer small without restricting the rest of the application to a Minarrow-specific API.
Release files for minarrow 0.17.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| minarrow-0.17.0.tar.gz | 2.8 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| minarrow-0.17.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| minarrow-0.17.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| minarrow-0.17.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| minarrow-0.17.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| minarrow-0.17.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 6.9 MB
Release files / minarrow-0.17.0.tar.gz
| Download URL | minarrow-0.17.0.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fa0adcfdf9dfc09abe979478e395fc2af1021a5f5e0ac80dc3912b04534bbbf
|
|
BLAKE2b-256 checksum How to use checksums |
81ded198badb38edeb58753690974f910f6832337c242b55992904d24226e128
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logRelease files / minarrow-0.17.0-cp39-abi3-win_amd64.whl
| Download URL | minarrow-0.17.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 831.6 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3452f76163b0e38927b06998603862b599c6d60ac5aafc8b8e7faa1d8c3b723e
|
|
BLAKE2b-256 checksum How to use checksums |
d1baffefd57844a550029a00c81436ce4e131bc91d7ee9e5648172eb1a7692c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logRelease files / minarrow-0.17.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | minarrow-0.17.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 850.9 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b4540e3d39eed9d9d4bf0940278f74f392187d6c21173a529817e0eb245d0d59
|
|
BLAKE2b-256 checksum How to use checksums |
1ae33802a924b6b5ccf96657742153c75a495a1707a7b25dc49c0da016fd9cb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logRelease files / minarrow-0.17.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | minarrow-0.17.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 784.9 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
bd7c0dcf6902722941d582ca9403966c1391ac9a1522e835fca81b362753bc52
|
|
BLAKE2b-256 checksum How to use checksums |
de176f961dd09a40a1aab5aacce7f34942f8031431872c2188ef57c812b62960
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logRelease files / minarrow-0.17.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | minarrow-0.17.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 776.5 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3a9d43498009a273480525a5dac327279e9eaacf8d10cc66ef301bf44832e2d2
|
|
BLAKE2b-256 checksum How to use checksums |
16b25b4180ebd2bc102ef148c57e906c959a97ecbf5b79b5ed77c2439952f6ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logRelease files / minarrow-0.17.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | minarrow-0.17.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 811.0 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
4a12fe590ec8a6182212acd87dcb2814b3eb24157325e25c8abd7892928894fd
|
|
BLAKE2b-256 checksum How to use checksums |
6853fc2c1e66f01dbac3896deb5df85d90047d6e5d2d0f2070842140f1a356c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency log