1![logo](http://google.github.io/flatbuffers/fpl_logo_small.png) FlatBuffers 2=========== 3 4[![Build Status](https://travis-ci.org/google/flatbuffers.svg?branch=master)](https://travis-ci.org/google/flatbuffers) 5[![Build status](https://ci.appveyor.com/api/projects/status/yg5idd2fnusv1n10?svg=true)](https://ci.appveyor.com/project/gwvo/flatbuffers) 6[![Join the chat at https://gitter.im/google/flatbuffers](https://badges.gitter.im/google/flatbuffers.svg)](https://gitter.im/google/flatbuffers?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 7[![Discord Chat](https://img.shields.io/discord/656202785926152206.svg)](https:///discord.gg/6qgKs3R) 8[![Twitter Follow](https://img.shields.io/twitter/follow/wvo.svg?style=social)](https://twitter.com/wvo) 9 10 11**FlatBuffers** 是一个高内存效率的跨平台序列化库。 它允许您直接访问序列化数据而无需先对其进行解析/解包,同时仍然具有出色的向前/向后兼容性。 12 13**转到我们的 [landing page][] 浏览我们的文档** 14 15## 支持的操作系统 16* Windows 17* MacOS X 18* Linux 19* Android 20* And any others with a recent C++ compiler. 21 22## 支持的编程语言 23* C++ 24* C# 25* C 26* Dart 27* Go 28* Java 29* JavaScript 30* Lobster 31* Lua 32* PHP 33* Python 34* Rust 35* TypeScript 36 37*and more in progress...* 38## FlatBuffers使用步骤 391. 按照[教程](docs/source/Tutorial.md)编写fbs文件,生成C/C++的代码可以参考[C教程](docs/source/CppUsage.md)和[C++教程](docs/source/CUsage.md)。 402. 按照[教程](docs/source/Building.md)编译项目,并得到flactc工具。 413. 使用flatc工具生成接口代码。 424. 在鸿蒙中使用FlatBuffers 43## OpenHarmony如何集成FlatBuffers 441. 头文件引入 45```c++ 46#include "flatbuffers/flatbuffers.h" 47``` 482. BUILD.gn添加头文件的引用 49```gn 50include_dirs = [ 51 "//third_party/flatbuffers/include" 52 ] 53``` 543. 在代码中使用生成的接口代码序列化和反序列化数据。 55## 贡献 56* [FlatBuffers Google Group][] to discuss FlatBuffers with other developers and users. 57* [FlatBuffers Issues Tracker][] to submit an issue. 58* [stackoverflow.com][] with [`flatbuffers` tag][] for any questions regarding FlatBuffers. 59 60*To contribute to this project,* see [CONTRIBUTING][]. 61 62## 许可 63*Flatbuffers* is licensed under the Apache License, Version 2.0. See [LICENSE][] for the full license text. 64 65<br> 66 67 [CONTRIBUTING]: http://github.com/google/flatbuffers/blob/master/CONTRIBUTING.md 68 [`flatbuffers` tag]: https://stackoverflow.com/questions/tagged/flatbuffers 69 [FlatBuffers Google Group]: https://groups.google.com/forum/#!forum/flatbuffers 70 [FlatBuffers Issues Tracker]: http://github.com/google/flatbuffers/issues 71 [stackoverflow.com]: http://stackoverflow.com/search?q=flatbuffers 72 [landing page]: https://google.github.io/flatbuffers 73 [LICENSE]: https://github.com/google/flatbuffers/blob/master/LICENSE.txt 74