About this project

Yoga is an embeddable layout engine that implements flexbox semantics aligned with web standards. Its core implementation is written in C++20 and built with CMake, and it ships with bindings for multiple programming languages, making it usable across platforms and runtimes. The project provides a wrapper script for building the main library and running unit tests: ```sh ./unit_tests <Debug|Release> ``` If ninja is installed, the script uses it for faster builds. Yoga is also available as a vcpkg port maintained by Microsoft and community contributors; users can request updates through the vcpkg repository. Testing is largely automated. Tests are generated from HTML fixtures that describe node structure, which are rendered in Chrome to produce expected layout results. New fixtures go in `gentest/fixtures`, for example: ```html <div id="my_test" style="width: 100px; height: 100px; align-items: center;"> <div style="width: 50px; height: 50px;"></div> </div> ``` To generate tests from new fixtures, install yarn classic, run `yarn install` to fetch test generator dependencies, then run `yarn gentest` in the yoga directory. For debugging, Yoga includes a VSCode launch configuration that supports debugging unit tests with breakpoints via "Debug C++ Unit tests (lldb)" or, on Windows, "Debug C++ Unit tests (vsdbg)".