Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
use the cbindgen crate and some decorators to DRY out the rust/python ffi #6869
Our FFI between pants python and rust is currently split across:
Unless you use a regex-based code search tool, this can make it difficult to understand how to change the FFI. There is duplication of the interface definition in the above ways, which can potentially be a source of subtle-to-not-so-subtle errors.
Changes to Rust objects and methods on the FFI interface no longer require changing multiple places at once, and the type declarations for FFI methods from python are generated from an