set(VERSION_MAJOR 2)
set(VERSION_MINOR 0)
-set(VERSION_PATCH 5)
+set(VERSION_PATCH 6)
set(VERSION_COMMIT 0)
find_program(GIT git)
#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 {
// 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;
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) {}
"--cpp-static-reflection",
"--gen-object-api",
]
-RUST_OPTS = BASE_OPTS + ["--rust", "--gen-all", "--gen-name-strings"]
+RUST_OPTS = BASE_OPTS + ["--rust", "--gen-all", "--gen-name-strings", "--rust-module-root-file"]
RUST_SERIALIZE_OPTS = BASE_OPTS + [
"--rust",
"--gen-all",
"--gen-name-strings",
"--rust-serialize",
+ "--rust-module-root-file",
]
TS_OPTS = ["--ts", "--gen-name-strings"]
LOBSTER_OPTS = ["--lobster"]
"reflection_generated.h")
# Python Reflection
-flatc_reflection(["-p"], "python/flatbuffers", "reflection")
\ No newline at end of file
+flatc_reflection(["-p"], "python/flatbuffers", "reflection")
{ "", "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)." },
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") {
bool GenerateRustModuleRootFile(const Parser &parser,
const std::string &output_dir) {
- if (parser.opts.one_file) {
+ if (!parser.opts.rust_module_root_file) {
// Don't generate a root file when generating one file. This isn't an error
// so return true.
return true;
}
bool generate() {
- if (parser_.opts.one_file) {
+ if (!parser_.opts.rust_module_root_file) {
return GenerateOneFile();
} else {
return GenerateIndividualFiles();
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //monster_test.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //include_test/sub/include_test2.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //include_test/sub/include_test2.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //include_test/sub/include_test2.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)
Automatically generated by the FlatBuffers compiler, do not modify.
Or modify. I'm a message, not a cop.
- flatc version: 2.0.5
+ flatc version: 2.0.6
Declared by : //include_test/include_test1.fbs
Rooting type : MyGame.Example.Monster (//monster_test.fbs)