A Rust API for programmatically invoking the FlatBuffers compiler (flatc) to generate code from .fbs schemas.
flatc-rust is a Rust crate that provides a programmatic API for invoking the FlatBuffers compiler (flatc). It allows developers to generate Rust code from FlatBuffers schema files (.fbs) directly within their build process, typically using Cargo build scripts. This solves the problem of manually running flatc commands and ensures generated code is always up-to-date with schema changes.
Rust developers working with FlatBuffers for efficient serialization, particularly those integrating FlatBuffers schemas into their projects and needing automated code generation during builds.
Developers choose flatc-rust for its seamless integration with Cargo build scripts, eliminating manual compilation steps and providing a Rust-native interface to flatc. It simplifies FlatBuffers workflow in Rust projects compared to manual flatc usage.
FlatBuffers compiler (flatc) as API (with focus on transparent .fbs to .rs code-generation via Cargo build scripts integration)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Designed for Cargo build scripts, it automates code generation during compilation, ensuring generated Rust code stays synchronized with schema changes without manual steps.
Provides a clean, Rust-native interface to flatc, inspired by similar tools like protoc-rust, making it intuitive for Rust developers to integrate.
Directly converts .fbs schema files to .rs Rust code (or other languages) programmatically, reducing errors from manual compilation.
While focused on Rust, it can generate code for any language supported by flatc, offering versatility beyond Rust-only projects.
Requires the flatc binary (version 1.10.0+) to be installed separately, adding setup complexity and potential version compatibility issues across platforms.
It's essentially a wrapper around flatc with no Rust-specific enhancements, missing opportunities for deeper integration or performance optimizations.
The README redirects to external documentation for examples, which can be less accessible and might lack comprehensive guidance for edge cases.