This commit enables CMake to generate a flatbuffers.pc file on install.
pkg-config eases the utilization of software libraries by enabling the
developers of a library to define how the library should be used.
It can be used as a tool by build systems to find and manage dependencies,
this is notably the default Meson behavior and optionally used by CMake.
Implemented server.go and half implemented client.go
Finishes implementation for greeter go example
Update grpc code for monster.fbs
Adds a couple of cpp methods
Adhere to gofmt standards
Adds a readme for issues with grpc
* feature/rust-tokio-bytes added feature name for tokio-bytes
* Added flexbuffer implementation, TODO: typecast to avoid recurse
* Converted codebase to utilize FlexBuffer implementation, need to resolve deserialization issues
* Added todo for lifetime issue, may use &'de [u8] for deserializer instead of current method
* Added proper &[u8] implementation
* Removed unused struct
* Added experimental fix to get_slice
* Added experimental fix to get_slice
* Avoided lifetime issues via ref structs, need to check if this hurts peformance
* Updated deserializer implementation to allow for borrowed data from Reader struct
* Fixed bug with str
* Removed unnecessary generic parameter
* Added unsafe to avoid lifetime complaints, current tests pass, need to review alternatives to unsafe
* Opinionated: Removed bytes crate as this implementation could be done in a separate crate
* Cleaned up flatbuffer
* Fixed sample / example
* Resolved PR feedback, need to resolve issues with tests
* Cleaned up FlexBuffer trait to be an auto impl
* Removed TODO
* Reverted Deserializer to only support &'de [u8]
* Cleaned up / renamed function for clarification
* Renamed FlexBuffer -> InternalBuffer for clarification on it's purpose
* Fixed issue with key bytes
* resolved issues with broken tests, confirming this is a breaking change
* Removed FIXME that's solved by splitting String and Key variants
* Implemented associated types approach
* Fixed backward slice logic
* Fixed MapReader compile error
* Added from_buffer for deserialization, removed function since it's only needed for deserialization
* Removed dead code
* Cleaned up buffer, removed AsRef in favor of Deref
* Renamed Buffer::as_str -> Buffer::buffer_str
* Minor cleanup
* Updated documentation, need to fix tests
* Removed unnecessary &
* Removed unused lifetime
* removed unnecessary as_ref
* Minor optimization wrap-up
* resolved issue with Clone
* Added test to verify no deep-copy
* Added for optimization
* Updated to use empty fn instead of default
* Updated comments / test name - plus the 0.3.0 version bump
* comment
* [Build, cmake] Add -Werror override option
This commit adds FLATBUFFERS_CXX_FLAGS cmake option.
This option allows override the -Werror flag (or any other flags).
Related issues: #6337, #5930
* Remove CMAKE_CXX_FLAGS replace option
* Fix C/C++ Create<Type>Direct with sorted vectors
If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".
* Changes due to code review
* Improve code readability
* Add generate of JSON schema to string to lib
* option indent_step is supported
* Remove unused variables
* Fix break in test
* Fix style to be consistent with rest of the code
* Fix double quotes for (u)int8 in json schema
* Fix reference file for JSON schema test
* Fix reference file for JSON schema test
* [idl_parser] Validate `force_align` on all possible paths
- added validation of `force_align` for `Vector`.
- added assertion to `flatbuffers::PreAlign` method
These changes should resolve following oss-fuzz issues:
- 6275816289861632
- 5713529908887552
- 4761242994606080
* size_t problem on Mac
* Fix review notes
Limit the length of the fuzzer input to 16384 characters to prevent timeout
in JSON parser (Vector of tables with key).
Related oss-fuzz issues:
- 5742497110294528
on the current Java Implementation.
The code dependencies related to JVM were removed and the project is able to target all available platforms.
The only requirement to implement to fully support a target is to implement functions described in `ByteArray.kt`.
Right now the code support JVM and native targets. JS port still missing, but just be trivial to introduce.
Currently, only the `jvm` and `macosX64` targets are enabled until we figure out how to enable tests on all
platforms on CI.
A submodule called "benchmark" is also introduced. It contains a series
of benchmarks comparing Java and Kotlin implementations of FlexBuffers and the UTF8 API.
Finally, this commit does not contain the scripts necessary to publish the artifacts. This will
be introduced at a later stage once the team has an agreement on how to rollout Kotlin releases.
* Remove a lot of redundancy from the Python generated code.
Update tutorial to reflect new Python generated code.
* Add aliases for newly deprecated Python generated methods.
This should help with backwards compatibility.
* Fix incorrect names in deprecated comments.
* remove inner attributes
* Added test for outdir in Rust
* add bin/outdir
* Moved outdir test to its own package and only run it if flatc is available
Co-authored-by: Casper Neo <cneo@google.com>
* Add codegen test for namespaced unions
* [Rust] Handle cross-namespace union use
* [Rust] Test namespace handling
* [Rust] Drop trailing whitespace in codegen
* [Rust] Set flags in generate_code.bat to match .sh
* [C#] Add additional namespace test file
* Define presence.
* Migrate to IsRequired and IsOptional methods
* moved stuff around
* Removed optional and required bools from FieldDef
* change assert to return error
* Fix tests.cpp
* MakeFieldPresence helper
* fmt
* old c++ compatibility stuff
Co-authored-by: Casper Neo <cneo@google.com>
* Apply NativeName before WrapInNameSpace in idl_gen_cpp.cpp
* remove actual_type argument from GetUnionElement -- it's always true
* Merge GetUnionElement's native_type and wrap_native argument -- they always have the same value.
* Use convenience method WrapNativeNameInNameSpace
* Remove wrap_namespace argument from GetUnionElement
* Move declaration closer to first use.
I'm also clarifying that while elements are not deduplicated, vectors
may contain more than one offset to the same value.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This is an attempt to explain how FlatBuffers encodes union types as an
extra section in the "FlatBuffers internals" document.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
* TS/ES6 modules spike iteration 1
* Initial modularized dasherized output
* Remove obsoleted parts and namespace wrapping
* Use _flatbuffers_ prefix
* First part of imports logic
* Second part of imports logic
* Fix TS/JS code removal mixup
* Alias imported symbols if same name from different namespaces and some fixes
* Use star import for bare imports
* Fix messed up string concat
* var to const and remove not needed semi
* Remove some cases of ns prefixing
* Add missing space
* Cleanups
* Completed initial import tracking logic
* Compilable output
* Adjust TypeScriptTest and dependents to work
* Use local flatbuffers package for tests
* Refactor away use of any
* Remove obsolete imported_fileset and reexport_map
* Still need any and fix JavaScriptTest.sh
* Fix test runs out of the box
* Temp add generated files
* TypeScriptTest replaces JavaScriptTest and cleanups
* Also remove reference to JavaScriptTest in TestAll.sh
* Remove old generated ts/js files
* Remove use of --js in generate_code scripts
* idl_gen_js_ts to idl_gen_ts and removal of js gen
* Remove obsoleted options
* Fix obsolete ts test detection
* Tweak ts compilation be as strict as possible
* Remove jsdoc type annotation generation
* Generated test ts files
* Fix search and replace messup
* Regenerated ts test output
* Use CharToLower
* Use normal for loop
* Rework namespacedir
* Revert "Rework namespacedir"
This reverts commit 6f4eb0104ceeb86011bb076ebca901138c48e068.
* Revert "Use normal for loop"
This reverts commit 676b2135bfaa1853dfbb06c92b5c16a0d81bb13a.
* Revert "Use CharToLower"
This reverts commit 2d08648d0d72d0af201fad80d54cdc76412b35e9.
* Again do rework but correct
* Avoid runtime cast
* Fix test runs
* Also add npm install to get tsc
* Bump node test versions
* for range to std for loop
* Clang format
* Missed one clang format
* Move accessor to later
* Attempt to make windows version of TypeScriptTest
* Want to see the output
* Try to get newer node at appveyor
* Style changes
Added the new method LookupTableByName for searching symbols in parent namespaces.
This method speedup (x50 or greater) symbol resolution (enum or struct) in parent namespaces.
The speedup was measured without `table.empty()` guard condition.
This method should suppress fuzzer timeout issue without artificial limits for nested namespaces (https://oss-fuzz.com/testcase-detail/6244168439169024).
Additionally, this commit speedup (x5) the GetFullyQualifiedName method by removing unnecessary temporary std::string object.
* [codegen] Search for includes in the directory containg the current file
This matches the behavior of a C preprocessor, see:
https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
* Skip FileExists() when file is guaranteed to not exist
* end comment with period to match others
* Unset FieldDef.optional if its key
* removed StringKey table, just removed an extra "required, key"
* removed extra newline
Co-authored-by: Casper Neo <cneo@google.com>
* Fix miri problems by assuming alignment is 1 in rust
* Removed is_aligned fn from rust verifier.
* Add back is_aligned, but make it w.r.t. buffer[0]
* touch unused variable
* touch unused variable
* +nightly
* Move Rust miri testing into its own docker
* fix bash
* missing one endian conversion
* fix endianness2
* format stuff
Co-authored-by: Casper Neo <cneo@google.com>
For some reason, this fuzzer failed to load the binary schema file
when run on the `/clusterfuzz` server.
Issue: https://oss-fuzz.com/testcase-detail/6215075358703616
This issue doesn't reproduce locally with the latest oss-fuzz docker image.