https://github.com/tencent/taitank
Taitank is a cross platform lightweight flex layout engine implemented in C++.
https://github.com/tencent/taitank
hippy layout-engine
Last synced: 9 months ago
JSON representation
Taitank is a cross platform lightweight flex layout engine implemented in C++.
- Host: GitHub
- URL: https://github.com/tencent/taitank
- Owner: Tencent
- License: other
- Created: 2021-04-12T03:16:34.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T07:42:27.000Z (over 1 year ago)
- Last Synced: 2025-05-11T12:46:45.783Z (9 months ago)
- Topics: hippy, layout-engine
- Language: C++
- Homepage: https://taitank.dev
- Size: 13.8 MB
- Stars: 531
- Watchers: 26
- Forks: 50
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Taitank Cross Platform Layout
 [](https://github.com/Tencent/Taitank/blob/main/LICENSE) [](https://github.com/Tencent/Taitank/pulls)  [](https://github.com/Tencent/Taitank/actions) [](https://codecov.io/gh/Tencent/Taitank)
English | [简体中文](./README.zh_CN.md) | [Homepage](//tencent.github.io/Taitank/)
## Introduction

**Taitank** is a cross platform lightweight flex layout engine implemented in C++.
Taitank is now applied in 27 [Tencent](http://www.tencent.com/) apps such as Mobile QQ, Mobile QQ Browser, Tencent Video App, QQ Music App,reaching hundreds of millions of ordinary users.
## Advantages
* Fully supported Flex
* Fast Layout and Low memory consumption
* Multi platform support
## Project structure
```text
├── CMakeLists.txt # compiler script.
├── assets # assets.
├── benchmark # benchmark.
├── examples # Taitank layout examples.
├── javascript # wasm layout source code.
├── src # Taitank layout source code.
├── tests # Taitank layout test.
└── toolchain # toolchain.
```
## Getting started
### Preparing environment
1. [CMake](https://cmake.org/) : build Taitank layout.
2. [Android Studio](https://developer.android.com/studio) with NDK: build Android so.
3. [Xcode](https://developer.apple.com/xcode/) with iOS sdk: build iOS so.
4. [emscripten](https://emscripten.org/docs/getting_started/downloads.html): build wasm.
5. [Python](https://www.python.org/): script to build Taitank layout.
### Build your first library
Change directory to cmake to build your project.
```bash
cd cmake
```
### Support Platforms
| name | description |
|----------------|-------------------------------------------------|
| macos | Build library for macos. |
| linux | Build library for linux. |
| android | Build library for android. |
| ios | Build library for ios. |
| browser & node | Build wasm for browser and node. |
### Testing
For testing we rely on [gtest](https://github.com/google/googletest)
If you make any changes you should pass all the tests.Tests are located in the `tests` directory. Run the tests by ececuting `build.sh`.
```bash
cd tests
./build.sh
```
### Benchmarks
Benchmarks are located in the `benchmark` directory. Run the benchmarks by ececuting `build.sh`.
```bash
cd benchmark
./build.sh
```
## Contribution
Developers are welcome to contribute to Tencent's open source, and we will also give them incentives to acknowledge and thank them. Here we provide an official description of Tencent's open source contribution. Specific contribution rules for each project are formulated by the project team. Developers can choose the appropriate project and participate according to the corresponding rules. The Tencent Project Management Committee will report regularly to qualified contributors and awards will be issued by the official contact.
## License
Taitank is [Apache-2.0 licensed](./LICENSE).