#numbers #algebraic #theory #initialization #free #bindings #flint

bin+lib antic

bindings for the antic C library for algebraic number theory

1 unstable release

0.1.0 Jul 13, 2020

#1465 in Math


Used in cyclotomic

LGPL-3.0-only

1MB
31K SLoC

antic-rs

This is a wrapper for the antic library for algebraic number theory.

Great library in terms of functionality, but the API is terrible because it's written in C! No borrow checking, no lifetime management, and worst of all, no RAII, so you have to remember to initialise and free objects yourself.

All of this can be solved by providing a safe Rust wrapper library.

This is mainly implemented for benchmarks in the code for our cyclotomic field library.

To compile this you need to have antic and flint installed.

bindgen invocation

The src/bindings.rs source file is generated by the script generate_bindings.sh, which does some magic to get bindgen to generate legal Rust code.

Dependencies

~1.4–2.4MB
~45K SLoC