Wrote the Rust side of the C(++) API