mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-04 04:33:23 +00:00
Change Rust generated file defaults (#7101)
* Change Rust generated file defaults After #6731, flatc changed its default behavior for generating rust code to fix some importing issues. This was a breaking change which invlidated the patch release, `flatc 2.0.5` (#7081). This PR reverses the default so we can release a patch update. However, does break Rust users who work at HEAD. * Bump flatc patch version (2.0.6) Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -185,6 +185,8 @@ const static FlatCOption options[] = {
|
||||
{ "", "reflect-names", "", "Add minimal type/name reflection." },
|
||||
{ "", "rust-serialize", "",
|
||||
"Implement serde::Serialize on generated Rust types." },
|
||||
{"", "rust-module-root-file", "",
|
||||
"Generate rust code in individual files with a module root file."},
|
||||
{ "", "root-type", "T", "Select or override the default root_type." },
|
||||
{ "", "require-explicit-ids", "",
|
||||
"When parsing schemas, require explicit ids (id: x)." },
|
||||
@@ -503,6 +505,8 @@ int FlatCompiler::Compile(int argc, const char **argv) {
|
||||
opts.mini_reflect = IDLOptions::kTypesAndNames;
|
||||
} else if (arg == "--rust-serialize") {
|
||||
opts.rust_serialize = true;
|
||||
} else if (arg == "--rust-module-root-file") {
|
||||
opts.rust_module_root_file = true;
|
||||
} else if (arg == "--require-explicit-ids") {
|
||||
opts.require_explicit_ids = true;
|
||||
} else if (arg == "--root-type") {
|
||||
|
||||
Reference in New Issue
Block a user