google / google/flatbuffers

[Rust] Add better support for "crate-per-schema"

Open
#8,273 21 comments 1 reaction 0 assignees View on GitHub
rust
Dominant language
C++
Stars
26.5k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

Description

Currently, flatc allows using `--rust-module-root-file` and `--gen-all` to generate multiple schemas into a single crate with a top-level `mod.rs`. This is good but makes it really hard to use in many contexts since the best (only?) option to have inter-dependent schemas is to generate everything together into a single crate.

Ideally, we can generate each schema independently of the includes (as each include will be its own generated crate), and link them all at build time.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.