Commit Graph

6 Commits

Author SHA1 Message Date
Derek Bailey f083b33f2a
code gen flexbuffer verifier (#7207)
* code gen flexbuffer verifier

* remove verify nested flexbuffers from flexbuffers

* made function static, and placed higher in file

* moved function to own header
2022-04-05 16:29:42 -07:00
James Kuszmaul e5f331db99
[TS] Add single-file ts codegen & bazel rule for typescript (#7161)
The headline here is adding a flatbuffer_ts_library rule for generating
typescript code in bazel. This entails some non-trivial other changes,
but ideally none are user-visible.

In particular:
* Added a --ts-flat-file flag that generates a single *_generated.ts
  file instead of separate files for each typescript type. This makes
  bazel much happier.
* Import the bazel rules_nodejs stuff needed to support building
  typescript in bazel
* Move flatbuffers.ts to index.ts because I wasn't sure how to make
  bazel comprehend the "main" attribute of the package.json. Happy
  to take another stab at figuring that out if really needed.
* Fix another couple keyword escaping spots in typescript...
2022-03-10 10:08:13 -08:00
Derek Bailey 061d61f3f8
Lua Generator using IR. (#6940)
* initial hack to get new Lua generator into flatc

* Starting to output enum defs for Lua

* Continue to work on table generation for Lua

* Finished basic getter access for Lua

* Added ability to get object by index

* Finished struct builder

* aliased reflection to r

* finish table builder generation

* register requiring files

* better generated header info

* Tying up loose ends

* Updated reflection to handle struct padding

* Addd type sizes to reflection

* Fixed some vector indirect issues

* Lua tests passed

* Misc cleanup

* ci fixes 1

* ci fixes 2

* renaming

* up size of type sizes

* manually ran clang-format-11 -i src/idl_parser.cpp

* fixed some windows casting

* remove stupid auto import

* more static_casting

* remove std

* update other build environments

* remove scoped enums

* replaced std::to_string with NumToString

* more win fixes

* more win fixes

* replaced old lua with new

* removed auto import

* review responses

* more style fixes

* refactor bfbs_gen_len to use code +=

* added consts

* fix lambda capture for windows

* remove unused return type
2021-12-02 21:29:19 -08:00
Derek Bailey 6c8c291559
[C++] Split flatbuffers.h into separate files (#6868)
* split flatbuffers.h into separate files

* wrong variable in cmakelists for android

* readded two accidentally deleted includes

* created buffer.h and moved buffer related things over
2021-11-10 22:26:09 -08:00
Yesudeep Mangalapilly 2dd2126379
Fix linker errors on (Free|Open)BSD. (#6860)
* Fix linker errors on (Free|Open)BSD.

* Adds a TODO for the FreeBSD linker flags: -lm and moves platform config to main BUILD.bazel
2021-09-27 12:07:04 -07:00
mustiikhalil 6af37e6729
[CMake] Renames BUILD files (#6457)
* Renamed build to build.bazel to stop xcode from complaining about it

* Renamed all build to build.bazel

* Fixes small ci issue
2021-02-11 10:16:57 -08:00