Metadata-Version: 2.4
Name: uriel
Version: 0.2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Rust
Requires-Dist: cffi>=1.17
License-File: LICENSE
Summary: Python bindings for Uriel, through its C ABI
Author-email: Aditya Chanana <achanana@cs.cmu.edu>
Maintainer-email: CMU Satyalab <gabriel@cmusatyalab.org>
License-Expression: Apache-2.0
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/cmusatyalab/uriel

# Uriel for Python

Python bindings for Uriel, through its C ABI (`rust/include/uriel/uriel.h`), with
[cffi](https://cffi.readthedocs.io).

The package is built with [maturin](https://www.maturin.rs), which compiles the Rust crate and
puts the library and its cffi declarations in the package, as `uriel._native`. uv builds it
when it installs the package, and again when the crate's sources change:

```sh
cd python && uv run pytest            # builds the package, then runs the tests
```

## Wheels for a device

`Dockerfile.aarch64` cross-builds a wheel for an aarch64 device with Ubuntu 20.04, such as a
Particle Tachyon. From the repository root:

```sh
docker build -t uriel-wheel-aarch64 -f python/Dockerfile.aarch64 python
docker run --rm -u $(id -u):$(id -g) -v $PWD:/src -w /src/python \
    -e CARGO_TARGET_DIR=/src/target/aarch64 uriel-wheel-aarch64 \
    uv build -o /src/target/wheels
```

The wheel is in `target/wheels/`. uv builds it from the sdist, which has only the files git
tracks. It talks to other Uriel processes, such as a Go app linked
with `liburiel.a`, over shared memory, whose layout the ABI version does not cover: build both
from the same commit.

