Metadata-Version: 2.4
Name: vexil-runtime
Version: 0.1.0
Summary: Python runtime support for Vexil-generated binary codecs
Project-URL: Homepage, https://github.com/vexil-lang/vexil
Project-URL: Documentation, https://vexil-lang.github.io/vexil/
Project-URL: Repository, https://github.com/vexil-lang/vexil.git
Project-URL: Bug Tracker, https://github.com/vexil-lang/vexil/issues
License-Expression: MIT OR Apache-2.0
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
Keywords: binary,codegen,schema,serialization,vexil
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Vexil runtime for Python

The Python wire runtime for code generated by
[`vexilc`](https://github.com/vexil-lang/vexil/tree/main/crates/vexilc). It
provides bit-level readers and writers plus the protocols used by generated
dataclasses. Python 3.10 or newer is required.

## Install

```sh
python -m pip install vexil-runtime
```

To work from a repository checkout instead:

```sh
python -m pip install ./packages/runtime-py
```

## Core API

```python
from vexil_runtime import BitReader, BitWriter

writer = BitWriter()
writer.write_u8(42)
writer.write_u16(1000)
writer.write_bool(True)
data = writer.finish()

reader = BitReader(data)
assert reader.read_u8() == 42
assert reader.read_u16() == 1000
assert reader.read_bool() is True
```

Generated types expose their own `encode` and `decode` helpers. Vexil's
[compliance vectors](https://github.com/vexil-lang/vexil/tree/main/compliance/vectors)
provide the shared byte-level contract for runtime verification.

Licensed under either
[MIT](https://github.com/vexil-lang/vexil/blob/main/LICENSE-MIT) or
[Apache-2.0](https://github.com/vexil-lang/vexil/blob/main/LICENSE-APACHE), at
your option.
