GitHub snapshot (not a live mirror).
The canonical repository is on GitLab:
https://gitlab.com/Obsidian_Jackal/objectbox-generator-rsThis GitHub copy is a manual upload: it does not include the full git history from GitLab, and it is not updated automatically. Prefer GitLab for clones, issues, and merge requests. Refresh this GitHub tree by hand when you want a newer snapshot.
Rust code generator for ObjectBox FlatBuffer schemas. Generates type-safe Rust code with FlatBuffer encoding/decoding from .fbs schema files.
- ✅ Parses
.fbsschema files - ✅ Generates Rust structs with proper types
- ✅ Generates FlatBuffer encoding (
to_flatbuffer()) - ✅ Generates FlatBuffer decoding (
from_flatbuffer()) - ✅ Supports: Long, Int, String, ByteVector, Bool, Float, Double
- ✅ ObjectBox-compatible format
use objectbox_codegen::{parse_schema_file, generate_rust_code};
// Parse schema
let schema = parse_schema_file("schemas/my_entity.fbs")?;
// Generate Rust code
generate_rust_code(&schema, "generated/")?;cargo run --example test_codegentable KeyValue {
id: ulong; // ObjectBox ID
value: [byte]; // ByteVector to store data
}The generator creates:
- Rust structs matching the schema
to_flatbuffer()method for encodingfrom_flatbuffer()method for decoding- Proper type conversions
- ObjectBox-compatible FlatBuffer format
anyhow- Error handling
AGPL-3.0 (GNU Affero General Public License v3)
This project is licensed under AGPL-3.0 to respect the license of the original ObjectBox Generator (also AGPL-3.0) and ensure legal compliance.
Important: The generated code (output) is yours to license as you wish. You can regard generated code as your own code with no license restrictions.
See LICENSE for full license text.
This code generator was created by reverse-engineering the approach and output format of the official ObjectBox Generator. While no source code was copied, and the implementation was written from scratch in Rust, we've chosen AGPL-3.0 to:
- Respect ObjectBox Generator's license
- Ensure legal compliance
- Contribute to open source
See DEVELOPMENT.md for details on how this was created.
- Canonical (GitLab): https://gitlab.com/Obsidian_Jackal/objectbox-generator-rs
- GitHub snapshot: https://github.com/Obsidian-Jackal/objectbox-fbs-codegen (no full history; not auto-updated)