diff options
author | Casper <casperneo@uchicago.edu> | 2022-02-15 11:48:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-15 11:48:42 -0500 |
commit | 615616cb5549a34bdf288c04bc1b94bd7a65c396 (patch) | |
tree | 3470bd68638e0efd6ffa91a350f1da98a9f4c3f0 /include | |
parent | 3413c33004ad9a568e2c7c9ae82954f5fa3798c5 (diff) | |
download | flatbuffers-615616cb5549a34bdf288c04bc1b94bd7a65c396.tar.gz flatbuffers-615616cb5549a34bdf288c04bc1b94bd7a65c396.tar.bz2 flatbuffers-615616cb5549a34bdf288c04bc1b94bd7a65c396.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/flatbuffers/base.h | 2 | ||||
-rw-r--r-- | include/flatbuffers/idl.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h index a5ac10d7..458ac3f7 100644 --- a/include/flatbuffers/base.h +++ b/include/flatbuffers/base.h @@ -140,7 +140,7 @@ #define FLATBUFFERS_VERSION_MAJOR 2 #define FLATBUFFERS_VERSION_MINOR 0 -#define FLATBUFFERS_VERSION_REVISION 5 +#define FLATBUFFERS_VERSION_REVISION 6 #define FLATBUFFERS_STRING_EXPAND(X) #X #define FLATBUFFERS_STRING(X) FLATBUFFERS_STRING_EXPAND(X) namespace flatbuffers { diff --git a/include/flatbuffers/idl.h b/include/flatbuffers/idl.h index 0b11ba45..7b04d0b5 100644 --- a/include/flatbuffers/idl.h +++ b/include/flatbuffers/idl.h @@ -633,6 +633,9 @@ struct IDLOptions { // If set, implement serde::Serialize for generated Rust types bool rust_serialize; + // If set, generate rust types in individual files with a root module file. + bool rust_module_root_file; + // The corresponding language bit will be set if a language is included // for code generation. unsigned long lang_to_generate; @@ -698,6 +701,7 @@ struct IDLOptions { mini_reflect(IDLOptions::kNone), require_explicit_ids(false), rust_serialize(false), + rust_module_root_file(false), lang_to_generate(0), set_empty_strings_to_null(true), set_empty_vectors_to_null(true) {} |