summaryrefslogtreecommitdiff
path: root/.gitignore
AgeCommit message (Collapse)AuthorFilesLines
2021-11-15Added Google benchmarks (and gtests) (#6920)Derek Bailey1-0/+4
* Added Google benchmarks (and gtests) * Default building benchmarks to OFF as it requires c++11 * Separate benchmark CMakeLists.txt to its own file * Move output directory to target just flatbenchmark
2021-09-23Include subdirectories in published npm package (#6850)Louis DeScioli1-1/+4
Updates the `files` globs in package.json to include subdirectories in order to also include the flexbuffers directory in the published npm package. Updates .gitignore to include the tsc-generated JS files.
2021-08-30Add html and latex to gitignore (#6819)Casper1-0/+2
Co-authored-by: Casper Neo <cneo@google.com>
2021-06-03npm update to 2.0.3 and script fixWouter van Oortmerssen1-4/+0
Change-Id: Idacbc5973e9c1f713f5c8e03513a83590e336fdb
2021-05-14Implements verifier and code gen for swift (#6373)mustiikhalil1-0/+1
Updates test cases on linux Adhere to new protocol naming Adds fuzzing Adds documentation Adds support for string unions Updated fuzzer generated code
2021-04-12[TS] Add Build TS to CI jobs (#6524)Björn Harrtell1-4/+0
* Add Build TS to CI jobs * Add npm compile step * Fix syntax * Add required code gen for TS * Exit on failure * Make TS code gen identical to test run * Remove duplicate TS code gen artifacts * Remove bad gitignore * Forgot parts of generate_code and make sure same settings for test run * Don't forget about the bat * Try and fix flatc args * Another attempt to fix args * Fix typo * Commit up to date code gen * Another attempt to fix sh/bat * Move -o param to after -I * Commit missing code gen file * Fix grpc code gen and test * Another grpc code gen fix * Rework to not use ts folder * Fix env vars in bat and make less churn * Move TS code gen to dedicated folder * Fix transpilation output folder and module paths * Fixes to code gen * Include generated js * Moved ts code gen * Remove test ts code gen folder
2021-03-11Remove `flatbuffers.pc` from the repository (#6508)Vladimir Glavnyy1-0/+1
2021-02-25fix for noUncheckedIndexedAccess in ts (#6474)Kamil Rojewski1-0/+1
2021-02-19[Go] Working on a go example plus fixing go grpc code (#6448)mustiikhalil1-1/+3
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
2021-02-11[CMake] Renames BUILD files (#6457)mustiikhalil1-0/+1
* Renamed build to build.bazel to stop xcode from complaining about it * Renamed all build to build.bazel * Fixes small ci issue
2021-02-10Updating working code (#6441)mustiikhalil1-0/+1
Fixes issues with namespaces in grpc ts Renamed welcome -> models
2020-11-23[C++] Add ParseJson(), Parser(Parser&&), update fuzzers (#6284)Vladimir Glavnyy1-0/+1
- add a new method ParseJson to minimize failures during fuzzing - add default (conditional) move-constructor for Parser - add a new monster_fuzzer - switch fuzzers to C++17 and `test/cpp17` generated code
2020-10-28optional scalars for ts/js (#6215)Kamil Rojewski1-1/+2
* optional scalars for ts/js * removed range based for * removed range based for
2020-10-27Adds NetTest.bat to run .NET Core tests on Windows (#6216)Derek Bailey1-1/+2
2020-10-25Removed C# references from java generator. Move annotations closer to ↵Derek Bailey1-1/+2
definitions (#6204)
2020-10-19[JS/TS] Rewrite flexbuffers JS to TS (#6148)Björn Harrtell1-4/+4
* Partial TS rewrite * Completed port but bugs remain * Expose builder function * Break out and fix stack-value and formatting
2020-09-17[JS/TS] Modernize TypeScript / JavaScript flatbuffers support (#6095)Björn Harrtell1-0/+5
2020-07-30adding fb import when no other imports are present (#6030)Kamil Rojewski1-1/+3
Co-authored-by: Kamil Rojewski <kamil.rojewski@gmail.com> Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
2020-07-21Allow to run cpp tests under grpc/tests/ using bazel. (#6040)Shengzhe1-0/+1
This is the first step to upgrade grpc dependency to the latest version. - Patch protobuf 3.6.1. and grpc 1.15.1 to fix build errors when using the latest Bazel version (3.4.1). - Add grpc/tests:grpc_test. One can kick off tests in Bazel by calling `bazel test grpc/tests/...`. - Add missing build targets in tests/BUILD in order to support grpc/tests/BUILD
2020-06-04fixed mutating inline values (#5942)Kamil Rojewski1-0/+1
Co-authored-by: Kamil Rojewski <kamil.rojewski@gmail.com>
2020-04-09[TS] Add Obj API (#5788)Khoi Dinh Trinh1-0/+1
* added basic code * backup work * got class property to work * backup progress * implementented fmt for creating code * added docs for genFieldUtils * back up work * added base helper js func * added union js code * added unpackTo and base for pack * added pack code * added null check for packing struct list * passes compile test * fixed some spacing of generated functions * added annotations for constructors * added obj api unpack test * tested pack to work * merge branch * separated js and ts test * fixed union signature to include string * fixed generator to support string union * hardcoded fb builder name * refactored struct vector creation * work around createLong * handle default value in constructor * update typescript docs * added notes about import flag * fixed formatting stuffs * undo TypescriptTest change * refactored fmt * updated generated code * remove ignoring union_vector for js * revert changes for .project * revert changes for package.json * don't generate js in ts test * fixed android project file * removed unused js function * removed package-lock.json * adjust createObjList to new signature * changed regex to callback style * fixed package.json * used existing func for generating annotation * changed ternary to !! * added return type for lambda * removed callback style for obj api generator * fixed js file indentation * removed unused header * added tests for string only union * handle string only union and refactor union conv func * updated generated ts files * renamed union conv func * made js test create files like other languages * removed union string only handling * don't allow null in createObjectOffsetList * updated generated ts code * changed the line that triggers Windows build errors * hopefully fix CI error
2020-03-02Added --filename-suffix and --filename-ext to flatc (#5778)Derek Bailey1-1/+2
* Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case. * Added --filename-suffix and --filename-ext to flatc * Fixed typo and added example generation of suffix and extension for C++ * Removed extra ; * Removed clang-format block from a region that didn't need it. Fixed an auto format of another clang-format block * Added docs, fixed pointer alignment, removed suffix test file
2020-02-24[Swift] Adds GRPC to Swift (#5758)mustiikhalil1-0/+1
* Adds the basic structure for required to add grpc support Added the message implementation Updated the code to confirm to the protocol flatbuffersobject Adds an example for Swift flatbuffers GRPC Started implementing the swift GRPC code Gen Generator generates protocols now Fixing ci issues Migrated the logic to use grpc_generator::File instead of string Refactored swift project Implemented GRPC in swift Finished implementing GRPC in swift Fixes issues Adds contiguousBytes initializer to swift Adds documentation + fixes buffer nameing in tables + structs Adds documentation + fixes buffer nameing in tables + structs Updated tests * Updated version
2020-01-09[Swift] Swift implementation 🎉🎉 (#5603)mustiikhalil1-0/+6
* Implemented the swift version of Flatbuffers Implemented serailzing, reading, and mutating data from object monster Fixes mis-aligned pointer issue Fixes issue when shared strings are removed from table Adds swift enum, structs code gen Fixed namespace issues + started implementing the table gen Added Mutate function to the code generator Generated linux test cases Fixed an issue with bools, and structs readers in table writer Swift docker image added Updated the test cases, and removed a method parameters in swift Fixed createVector api when called with scalars Fixed issues with scalar arrays, and fixed the code gen namespaces, added sample_binary.swift Cleaned up project Added enum vectors, and their readers Refactored code Added swift into the support document Added documentation in docs, and fixed a small issue with Data() not being returned correctly Fixes Lowercase issue, and prevents generating lookups for deprecated keys * Made all the required funcs to have const + removed unneeded code + fix lowercase func * Removed transform from lowercased and moved it to function * Fixes an issue with iOS allocation from read * Refactored cpp code to be more readable * casts position into int for position * Fix enums issue, moves scalar writer code to use memcpy * Removed c_str from struct function * Fixed script to generate new objects when ran on travis ci: fix * Handles deallocating space allocated for structs * Updated the test cases to adhere to the fileprivate lookup, no mutation for unions, and updated the names of the vector functions
2019-12-23Add flatc '--cpp_std' switch (#5656)Vladimir Glavnyy1-0/+1
* Add flatc '--cpp_std' switch and sandbox for C++17 code generator - Added 'flac --cpp_std legacy' for compatibility with old compilers (VS2010); - Added experimental switch 'flac --cpp_std c++17' for future development; - Added C++17 sandbox test_cpp17.cpp; - C++ code generator generates enums with explicit underlying type to avoid problems with the forward and backward schema compatibility; - Adjusted CMakeLists.txt, CI and generate code scripts to support of introduced '--cpp_std'; * Fix --cpp_std values: c++0x, c++11, c++17 * Add 'cpp::CppStandard' enum * Add testing engine into test_cpp17 * Rebase to upstream/master * Set default '--cpp-std C++0x' * Fix code generation (--cpp_std C++11) in CMakeLists.txt - Fix dependency declaration of grpctest target * Revert --cpp-std for the tests from explicit C++11 to flatc default value (C++0x)
2019-04-05Add files generated by CMake to git ignore (#5278)Henry Lee1-0/+3
2018-12-13Enable flatbuffer to initialize Parser from bfbs (#4283) (#5077)tira-misu1-0/+2
* Enable flatbuffer to initialize Parser from bfbs (#4283) Now its possible to generate json data from bfbs data type and flatbuffers data and visa versa. * add deserialize functionality in parser from bfbs * add small usage sample * Fix build break * Merge branch 'pr/1' into fix-issue4283 * Fix buildbreak * Build monster_test.bfbs with --bfbs-builtins Attribute flexbuffer has be included in bfbs. Only with this attribute test will run. By initialization a parser by a bfbs the attribute has to be known for this filed. monsterdata_test.golden has a flexbuffer field so parse would fail. * Fix generate_code.sh * Revert automatic indent changes by IDE * Auto detect size prefixed binary schema files * Use identifier (bfbs) to detect schema files
2018-10-11Refactoring of idl_parser (#4948)Vladimir Glavnyy1-0/+2
* Refactoring of numbers parser More accurate parse of float and double. Hexadecimal floats. Check "out-of-range" of uint64 fields. Check correctness of default values and metadata. * Remove locale-independent code strtod/strtof from PR #4948. * small optimization * Add is_(ascii) functions * is_ascii cleanup * Fix format conversation * Refine number parser * Make code compatible with Android build * Remove unnecessary suppression of warning C4127
2018-09-03delete and ignore Cargo.lock files (#4906)Robert1-0/+1
2018-09-02Port FlatBuffers to Rust (#4898)Robert1-0/+2
This is a port of FlatBuffers to Rust. It provides code generation and a runtime library derived from the C++ implementation. It utilizes the Rust type system to provide safe and fast traversal of FlatBuffers data. There are 188 tests, including many fuzz tests of roundtrips for various serialization scenarios. Initial benchmarks indicate that the canonical example payload can be written in ~700ns, and traversed in ~100ns. Rustaceans may be interested in the Follow, Push, and SafeSliceAccess traits. These traits lift traversals, reads, writes, and slice accesses into the type system, providing abstraction with no runtime penalty.
2018-07-29FlatBuffers implementation for the Lobster programming languageaardappel1-0/+1
Language, see: http://strlen.com/lobster/ and https://github.com/aardappel/lobster
2018-07-05Lua (5.3) Language addition (#4804)Derek Bailey1-0/+4
* starting Lua port of python implmention. Syncing commit * Bulk of Lua module port from Python done. Not tested, only static analysis. Need to work on binary strings. Started work on flatc lua code generation * Fixed all the basic errors to produced a binary output from the builder, don't know if it is generated correctly, but it contains data, so that must be good * fixed binary set command that was extending the array improperly * continued improvement * Moved lua submodules down a directory so their names don't clash with potential other modules. Added compat module to provide Lua versioning logic * Successful sample port from Python * working on testing Lua code with formal tests * continued to work on tests and fixes to code to make tests pass * Added reading buffer test * Changed binaryarray implmentation to use a temporary table for storing data, and then serialize it to a string when requested. This double the rate of building flatbuffers compared to the string approach. * Didn't need encode module as it just added another layer of indirection that isn't need * profiled reading buffers, optimizations to increase read performance of monster data to ~7 monster / millisecond * Writing profiler improvments. Get about ~2 monsters/millisecond building rate * removed Numpy generation from Lua (came from the Python port) * math.pow is deprecated in Lua 5.3, so changed to ^ notation. Also added .bat script for starting Lua tests * adding results of generate_code.bat * simple edits for code review in PR. * There was a buffer overflow in inserting the keywords into the unorder set for both the Lua and Python code gens. Changed insertion to use iterators. * fixed spacing issue * basic documenation/tutorial updates. Updated sample_binary.lua to reflect the tutorial better * removed windows-specific build step in Lua tests
2018-05-18Add [Dart] support (#4676)Dan Field1-0/+7
* Add [Dart] support * fix enum vectors * Allow for opt out of string interning * fix comment style, make interning opt in * remove Offset<T>, prefer int * avoid creating unnecessary vtable objects * start work on tests - do not generate builder if struct has 0 fields - add int64 * support reading structs properly * correctly handle reading vectors of structs, dartfmt * support structs, fix unnecessary prepares * fix bool customizations * undo unintentional removal of file * docs updates, complete tutorial, bug fix for codegen * more documentation * Update docs, add to doxygen file * update package structure, add samples script/code * rearrange sample * Tests * Add readme for pub * cleanup package for pub * update docs for renamed file * remove custom matcher, use `closeTo` instead * remove unintentional file * remove unintended file checkin * use auto, move method, cleanup * refactor to ObjectBuilders, add Builders * Update tests, examples * Add files missing from previous commit * documentation and example updates * Update LICENSE, make dartanalyzer happy, fix minor bugs, get rid of duplicate files, publish script * fix sample for slightly different schema * Update pubspec.yaml
2018-04-27Include services in reflection data (fixes #4639) (#4713)Tobias Oberstein1-0/+1
* include service in reflection data (fixes #4639) * changes from review * regenerated test data
2018-03-12Java/C#/Python prefixed size support (#4445)Robert Schmidtke1-0/+1
* initial changes to support size prefixed buffers in Java * add slice equivalent to CSharp ByteBuffer * resolve TODO for slicing in CSharp code generation * add newly generated Java and CSharp test sources * fix typo in comment * add FinishSizePrefixed methods to CSharp FlatBufferBuilder as well * add option to allow writing the prefix as well * generate size-prefixed monster binary as well * extend JavaTest to test the size prefixed binary as well * use constants for size prefix length * fuse common code for getRootAs and getSizePrefixedRootAs * pulled file identifier out of if * add FinishSizePrefixed, GetSizePrefixedRootAs support for Python * Revert "extend JavaTest to test the size prefixed binary as well" This reverts commit 68be4420dda47e8d0600bb19691f03be71503a68. * Revert "generate size-prefixed monster binary as well" This reverts commit 2939516fdf78df4f061c627221e232b312301417. * fix ByteBuffer.cs Slice() method; add proper CSharp and Java tests * fix unused parameter * increment version number * pulled out generated methods into separate utility class * pulled out generated methods into separate utility class for Python * fix indentation * remove unnecessary comment * fix newline and copyright * add ByteBufferUtil to csproj compilation * hide ByteBuffer's internal data; track offset into parent's array * test unsafe versions as well; compile and run in debug mode * clarify help text for size prefix * move ByteBuffer slicing behavior to subclass * fix protection levels * add size prefix support for text generation * add ByteBufferSlice to csproj compilation * revert size prefix handling for nested buffers * use duplicate instead of slice for removing size prefix * remove slice subclass and use duplicate for removing size prefix * remove slice specific tests * remove superfluous command line option
2018-03-08Update .gitignore with Ninja stuff (#4659)desqaz1-1/+6
2018-02-05Add initial Bazel WORKSPACE and BUILD (#4608)Joe Schafer1-1/+6
For #4574. To test: bazel test --verbose_failures //:flatbuffers_test
2017-12-01publish additional js/flatbuffers.mjs to npm to support ESModules in node ↵Paul Taylor1-0/+1
(#4504)
2017-11-06Text files should not have executable bit set (#4480)Sergey Avseyev1-0/+0
2017-10-16Nullable java (#4455)Yonggang Li1-0/+2
* add _Nullable Support for C++ interface * generate @Nullable for Java generated code
2017-08-11Vector of unions for TS/JS and PHP (#4404)Kamil Rojewski1-0/+1
* Eclipse ignore * TypeScript support * Prefixing enums * Test results * Merged JS and TS generators * Fixed AppVeyor build problems * Fixed more AppVeyor build problems * Fixed more AppVeyor build problems * Changed TS flag to options struct * Storing options by value * Removed unneeded const * Re-export support for unions * Uint support * Casting bools to numbers for mutation * TS shell tests * Reverted generates js test file to original version * Backing up js tests and properly generating test data * Not importing flatbuffers for TS test generation * Not overwriting generated js for tests * AppVeyor test fixes * Generating the most strict TS code possible * Not returning null when creating vectors * Not returning null from struct contructors * Vector of unions for ts/js * Sanity check for languages * Indentation fix + output test files * Vectors of unions for php * Fixes to union vector handling + tests
2017-07-20C++98 (stlport) support for core FlatBuffers and FlexBuffers.Stewart Miles1-0/+6
* Added internal - limited - implementation of flatbuffers::unique_ptr for STLs that don't ship with std::unique_ptr. In C++11 and beyond this is just an alias for std::unique_ptr. * Aliased used type traits structs is_scalar is_floating_point is_unsigned into flatbuffers namespace so they can be replaced in C++98 implementations. Right now these point at stlport's TR1 implementations. * Wrapped vector::data() in vector_data(). * Wrapped vector::emplace_back() in vector_emplace_back(). * Wrapper string::back() in string_back(). * Added variants of FlatBufferBuilder::CreateVector() and FlatBufferBuilder::CreateVectorOfStructs() that allow the use of plain function pointers. Generated code has also been modified to use plain functions to build objects rather than std::function() so all generated code will work in C++98 applications. * Added flexbuffers::Builder::Vector(), flexbuffers::Builder::TypedVector() and flexbuffers::Builder::Map() methods that allow the use of plain function pointers. * Changed Parser to internally use plain function pointers when parsing table and vector delimiters. * Added specializations of NumToString() for 64-bit types that aren't supported by stringstream in stlport. * Overloaded numeric_limits for 64-bit types not supported by stlport. * Replaced build_apk.sh (which was broken by deprecation of the "android" tool in the Android SDK) with build.gradle and the appropriate gradle wrapper to build an APK. * Switched Android build to build against all STL variants. * Updated travis configuration to build Android test and sample. Tested: * Verified all tests continue to work on Linux, OSX and Android. * Verified Travis build is green. Change-Id: I9e634363793f85b9f141d21454b10686020a2065
2017-04-21TS tests fixes (#4265)Kamil Rojewski1-0/+1
* Eclipse ignore * TypeScript support * Prefixing enums * Test results * Merged JS and TS generators * Fixed AppVeyor build problems * Fixed more AppVeyor build problems * Fixed more AppVeyor build problems * Changed TS flag to options struct * Storing options by value * Removed unneeded const * Re-export support for unions * Uint support * Casting bools to numbers for mutation * TS shell tests * Reverted generates js test file to original version * Backing up js tests and properly generating test data * Not importing flatbuffers for TS test generation * Not overwriting generated js for tests * AppVeyor test fixes
2017-04-10TypeScript support (#4232)Kamil Rojewski1-1/+4
* Eclipse ignore * TypeScript support * Prefixing enums * Test results * Merged JS and TS generators * Fixed AppVeyor build problems * Fixed more AppVeyor build problems * Fixed more AppVeyor build problems * Changed TS flag to options struct * Storing options by value * Removed unneeded const * Re-export support for unions * Uint support * Casting bools to numbers for mutation * TS shell tests * Reverted generates js test file to original version * Backing up js tests and properly generating test data
2017-03-29Updated .gitignore for C#Wouter van Oortmerssen1-0/+2
Change-Id: I6c253b0ded187a4945f5e862aae721cf4fda6398
2016-11-07chore(lint) (#4079)Michael Paulson1-0/+1
* chore(lint) I accidentally let 2 pieces of lint in with my generated code. * fix(generate-code): I did not generate all the required code for tests.
2016-09-07option to build shared library,defeault offchangnet1-0/+1
2016-07-20Merge branch 'master' of https://github.com/google/flatbuffers into grpc2Wouter van Oortmerssen1-2/+3
2016-07-20Added optional object based API for C++.Wouter van Oortmerssen1-0/+2
Change-Id: If927f3ea3fb3723088fa287f24bdd1ad43c8d1d1 Tested: on Linux.
2016-07-05Move maven `pom.xml` from the java folder to the root folder.Romain Gilles1-2/+3
This avoid to put the pom.xml file into the source directory. Normally the pom file is in a parent (/parent) folder and it is not mixed with the java source code. An other thing is: this will make import of the project more easy from a IDE. The side effect is that the target folder where maven build artifacts will move from the <flatbuffers>/java/target to <flatbuffers>/target therefore the gitignore file has been updated in consequences.