Skip to main content
yace

Welcome to yace

PyPI Build Status https://coveralls.io/repos/github/safl/yace/badge.svg?branch=main pre-commit REUSE status

yace generates the bindings of a C API for other languages. You describe the FFI boundary of the API as a C header, in a subset of C99 that can be described equivalently in C, C++, Python, Rust and Zig. From that header, yace generates code that is idiomatic for each language. For C, yace generates a C API with pretty-printers for every struct, union and enum. A field of bits, an integer whose parts are named by masks, is printed part by part, and read and written by part in every language. A header outside the subset is parsed too, and yace reports every rule of the subset that the header breaks.

The project is hosted on GitHub, and its documentation is at safl.dk/yace.

Bindings are generated for C, C++, Python (ctypes), Cython (a compiled module, and a .pxd of the C API), Rust, Zig and Go. Each target builds and runs a check of what it generated against the layout the C compiler gives every record, and the C API and Zig check every function’s signature against the header too.

A header can also be written by a generator, from something other than C, and taken as one written by hand: yace --generate file.py:Class, or a generator installed by name. A generator proposed to xNVMe writes the NVMe specification headers of xNVMe in this way, from the data model that senfd makes of the specification documents.

Contributions are welcome; the documentation says how the code is laid out.

Metadata

Release files for yace 0.14.5

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

Source distribution (sdist)

Source distribution for yace 0.14.5
File Size Uploaded Provenance Actions
yace-0.14.5.tar.gz 311.6 kB Without provenance Details for yace-0.14.5.tar.gz

Built distribution (wheel)

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

Total release size: 551.4 kB

Release files / yace-0.14.5.tar.gz

Download URL yace-0.14.5.tar.gz
Size 311.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fa332aa880faf8982516a351f8d6aa55dc138e6edd2dde5f031ac7a9d7704ab0
BLAKE2b-256 checksum
How to use checksums
d2166bf357d14e2c9e81f5637b9186e33d1f7b575c94a80485655d0694bbdadc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / yace-0.14.5-py3-none-any.whl

Download URL yace-0.14.5-py3-none-any.whl
Size 239.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3fa31c5ae8576942a9b47570d23962cd4a5f1cf9b54746b7d683db88cdffceb
BLAKE2b-256 checksum
How to use checksums
2f4121c55ec8d61587276e17ef3ce9ad4b8a77de83901fa6fa8da53f28e59197
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for yace 0.14.5

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

0.14.5 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