external_yoga:基于 C++ 的跨语言 flexbox 布局引擎项目

可用于在多语言环境中实现高性能的 flexbox 布局。项目以 C++ 14 为核心实现,提供多语言绑定,支持通过 CMake 构建,含自动生成测试及 VSCode 调试配置,性能优异且易于嵌入。【此简介由AI生成】

分支7Tags4
文件最后提交记录最后更新时间
add .github .gitee1 个月前
chore: add openvela-reviewer team to CODEOWNERS7 天前
Add Global CMake Build and OSS Tests (#1217)1 个月前
Basic CocoaPods Validation (#1303)1 个月前
Setup publishing for Yoga stables1 个月前
Change how we set cmake policy (#1288)1 个月前
Sync up package descriptions (#1307)1 个月前
Enable -Wextra in C++ builds (#1294)1 个月前
Remove YGExperimentalFeatureFixAbsoluteTrailingColumnMargin (#1317)1 个月前
Hook Yoga's Gradle build into Gradle Enterprise1 个月前
Remove YGExperimentalFeatureFixAbsoluteTrailingColumnMargin (#1317)1 个月前
Bump to 2.0.11 个月前
Remove some easy yoga/libs1 个月前
Update project to use Gradle's plugins{} block1 个月前
Remove YGExperimentalFeatureFixAbsoluteTrailingColumnMargin (#1317)1 个月前
Docusaurus: Replace config basics (#1314)1 个月前
Update Gradle Setup (#1215)1 个月前
Fix Yoga's conditional use of std::bit_cast<>()1 个月前
Start Adding GitHub Actions (#1165)1 个月前
Add .clang-format7 年前
Add .editorconfig8 年前
fix: git status/git status --ignore normalization check problem1 个月前
Change how we set cmake policy (#1288)1 个月前
Fix License Headers and Whitespace1 个月前
Default branch renames (#1102)1 个月前
Update copyright headers to yearless format7 年前
example license9 年前
Add Global CMake Build and OSS Tests (#1217)1 个月前
Bump to 2.0.11 个月前
Bump to 2.0.11 个月前
Setup publishing of snapshots using io.github.gradle-nexus.publish-plugin1 个月前
Remove YGExperimentalFeatureFixAbsoluteTrailingColumnMargin (#1317)1 个月前
Bump to 2.0.11 个月前
Gradle to 8.11 个月前
Update Gradle Setup (#1215)1 个月前
Docusaurus: Use yarn workspaces (#1313)1 个月前
Quick and dirty versioning script (#1305)1 个月前
Setup publishing of snapshots using io.github.gradle-nexus.publish-plugin1 个月前
Add Global CMake Build and OSS Tests (#1217)1 个月前
Add Global CMake Build and OSS Tests (#1217)1 个月前
Docusaurus: Use yarn workspaces (#1313)1 个月前

Yoga Support Ukraine CocoaPods npm Maven Central

Yoga 是一款可嵌入且性能优异的 flexbox 布局引擎,提供多种语言的绑定。

构建

Yoga 的主要实现面向 C++ 14,同时配备 CMake 构建逻辑。我们提供了一个包装器,用于构建主库并运行单元测试。

./unit_tests <Debug|Release>

虽然非必需,但如果已安装 ninja,此脚本将使用它来加快构建速度。

Yoga 还是由 Microsoft 和社区贡献者维护的 vcpkg 端口集合的一部分。如果版本已过时,请在 vcpkg 代码库上创建问题或拉取请求

添加测试

Yoga 的许多测试是自动生成的,使用描述节点结构的 HTML 测试装置。这些测试装置在 Chrome 中渲染,以生成树的预期布局结果。新的测试装置可添加到 gentest/fixtures

<div id="my_test" style="width: 100px; height: 100px; align-items: center;">
  <div style="width: 50px; height: 50px;"></div>
</div>

从已添加的测试固件生成新测试:

  1. gentest 目录中运行 bundle install 以安装测试生成器的依赖项。
  2. gentest 目录中运行 ruby gentest.rb

调试

Yoga 提供了 VSCode 的 "launch.json" 配置,允许调试单元测试。只需添加断点,然后运行“Debug C++ Unit tests (lldb)”(在 Windows 上为“Debug C++ Unit tests (vsdbg)”)即可。

项目介绍

可用于在多语言环境中实现高性能的 flexbox 布局。项目以 C++ 14 为核心实现,提供多语言绑定,支持通过 CMake 构建,含自动生成测试及 VSCode 调试配置,性能优异且易于嵌入。【此简介由AI生成】

定制我的领域