Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
Y

yoga

> 编程语言
Open source

Yoga is an embeddable layout engine targeting web standards.

18.8K stars0 likes0 views
WebsiteGitHub

About

Yoga is an embeddable layout engine targeting web standards.

Yoga

Yoga is an embeddable and performant flexbox layout engine with bindings for multiple languages.

Building

Yoga's main implementation targets C++ 20 with accompanying build logic in CMake. A wrapper is provided to build the main library and run unit tests.

bash
./unit_tests <Debug|Release>

While not required, this script will use ninja if it is installed for faster builds.

Yoga is additionally part of the vcpkg collection of ports maintained by Microsoft and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Adding Tests

Many of Yoga's tests are automatically generated, using HTML fixtures describing node structure. These are rendered in Chrome to generate an expected layout result for the tree. New fixtures can be added to gentest/fixtures.

xml

</div>

To generate new tests from added fixtures:

  1. Ensure you have yarn classic installed.
  2. Run yarn install to install dependencies for the test generator.
  3. Run yarn gentest in the yoga directory.

Debugging

Yoga provides a VSCode "launch.json" configuration which allows debugging unit tests. Simply add your breakpoints, and run "Debug C++ Unit tests (lldb)" (or "Debug C++ Unit tests (vsdbg)" on Windows).

Issues· 173 open

View all issuesOpen on GitHub
  • #1859

    Can we get a new release of yoga?

    Updated Sep 28, 2026
  • #2027

    space-around misplaces the first child when children use a measure function

    Updated Sep 21, 2026
  • #2019

    Stale computedFlexBasis is reused across layouts: a flex: 1 node keeps its previous size after relayout at a new root size

    Updated Sep 2, 2026
  • #2007

    Layout time doubles per nesting level: `computeMinContentMainSize` recurses twice per child

    Updated Aug 13, 2026
  • #1998

    [Feature] flex-wrap: balance

    Updated Jul 20, 2026
  • #1991

    [Question] Clarification on community pull request acceptance policy

    Updated Jul 5, 2026
  • #1409

    Yoga does not respect automatic minimum size for flexbox items

    AlgorithmUpdated Jun 8, 2026
  • #1934

    Build tests/YGPersistenceTest.cpp fails with array-bounds error on GCC 16 (-O2 / -O3) due to -Werror

    Updated May 4, 2026
  • #1932

    calculateBaseline(node) may return NaN if the baselineChild has not been measured

    Updated Apr 15, 2026
  • #1853

    I'm dumb. How do I build this so it works on Android and iOS?

    Updated Mar 30, 2026

> Tags

C++

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言