diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70c009c2d..3e76107a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,10 @@ jobs: run: make -j4 - name: test run: ./flattests + - name: make flatc executable + run: | + chmod +x flatc + ./flatc --version - name: upload build artifacts uses: actions/upload-artifact@v1 with: @@ -79,6 +83,10 @@ jobs: echo $info | grep "universal binary with 2 architectures" - name: test run: _build/Release/flattests + - name: make flatc executable + run: | + chmod +x _build/Release/flatc + ./_build/Release/flatc --version - name: upload build artifacts uses: actions/upload-artifact@v1 with: diff --git a/dart/CHANGELOG.md b/dart/CHANGELOG.md index 4ad66dce1..cfed9def7 100644 --- a/dart/CHANGELOG.md +++ b/dart/CHANGELOG.md @@ -1,19 +1,20 @@ ## 2.0.0 - switch to null safety (#6696) -- add Object APIs (pack/unpack) (#6682, #6723) +- add Object APIs (pack/unpack) (#6682, #6723, #6846) - add custom builder buffer allocator support (#6711) -- add Builder.size() - finished buffer size (#6403) +- add `Builder.size()` - finished buffer size (#6403) - make `writeString()` argument non-nullable (#6737) - make tables fixed size (expect the number of fields when creating) (#6735) - make table deduplication optional (param `deduplicateTables`) (#6734) -- change Builder.reset() to reuse an existing buffer (#6661) +- change `Builder.reset()` to reuse an existing buffer (#6661) - change table building to assert() instead of exceptions (#6754) - optimize `writeString()` for ASCII (param `asciiOptimization`) (#6736) -- change `StringReader` to make ASCII optimization optional (param `asciiOptimization`) (#6758) +- change `StringReader` to make ASCII optimization optional (param `asciiOptimization`) (#6758) +- change `[byte]` and `[ubyte]` representation to `dart:typed_data` `Int8List` and `Uint8List` (#6839) - rename `lowFinish()` to `buffer` getter (#6712) -- fix Builder._writeString() - always write trailing zero byte (#6390) -- fix Builder.reset() - clear vTables (#6386) +- fix `Builder._writeString()` - always write trailing zero byte (#6390) +- fix `Builder.reset()` - clear vTables (#6386) - make sure added padding is zeroed, same as in C++ (#6716) - many performance improvements (#6755) @@ -28,4 +29,4 @@ ## 1.9.0 -- Initial release, supports Dart 1.x and many dev versions of Dart 2.x \ No newline at end of file +- Initial release, supports Dart 1.x and many dev versions of Dart 2.x diff --git a/dart/README.md b/dart/README.md index 11bc0c48f..312c1dada 100644 --- a/dart/README.md +++ b/dart/README.md @@ -1,13 +1,17 @@ # FlatBuffers for Dart -This package is used to read and write FlatBuffer files in Dart. +This package is used to read and write [FlatBuffers](https://google.github.io/flatbuffers/). -Most consumers will want to use the [`flatc`](https://github.com/google/flatbuffers) -compiler to generate Dart code from a FlatBuffers IDL schema. For example, the -`monster_my_game.sample_generated.dart` was generated with `flatc` from -`monster.fbs` in the example folder. The generated classes can be used to read -or write binary files that are interoperable with other languages and platforms -supported by FlatBuffers, as illustrated in the `example.dart` in the +Most consumers will want to use the [`flatc` - FlatBuffer compiler](https://github.com/google/flatbuffers) binary for your platform: +* [Linux](https://github.com/google/flatbuffers/suites/4363603985/artifacts/114682272) +* [macOS](https://github.com/google/flatbuffers/suites/4363603985/artifacts/114682273) +* [Windows](https://github.com/google/flatbuffers/suites/4363603985/artifacts/114682274) + +The FlatBuffer compiler `flatc` reads a FlatBuffers IDL schema and generates Dart code. +The generated classes can be used to read or write binary data/files that are interoperable with +other languages and platforms supported by FlatBuffers, as illustrated in the `example.dart` in the examples folder. -Additional documentation and examples are available [at the FlatBuffers site](https://google.github.io/flatbuffers/index.html) \ No newline at end of file +For more details and documentation, head over to the official site and read the +[Tutorial](https://google.github.io/flatbuffers/flatbuffers_guide_tutorial.html) and how to +[use FlatBuffers in Dart](https://google.github.io/flatbuffers/flatbuffers_guide_use_dart.html). \ No newline at end of file diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index ad0cf3b5a..5fe53b1dc 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -1,17 +1,15 @@ name: flat_buffers version: 2.0.0 -description: > - FlatBuffers reading and writing library for Dart. Use the flatc compiler to - generate Dart classes for a FlatBuffers schema, and this library to assist with - reading and writing the binary format. - - Based on original work by Konstantin Scheglov and Paul Berry of the Dart SDK team. +description: FlatBuffers reading and writing library for Dart. Based on original work by Konstantin Scheglov and Paul Berry of the Dart SDK team. homepage: https://github.com/google/flatbuffers documentation: https://google.github.io/flatbuffers/index.html + +environment: + sdk: '>=2.12.0 <3.0.0' + dev_dependencies: test: ^1.17.7 test_reflective_loader: ^0.2.0 path: ^1.8.0 lints: ^1.0.1 -environment: - sdk: '>=2.12.0 <3.0.0' +