// the find
jordwalke/flex
Reason CSS Flexbox implementation
A native Reason port of Facebook's Yoga flexbox layout engine, targeting OCaml's native compiler and JS via js_of_ocaml. The benchmark story is the real pitch: native Reason beats C at the same algorithm, which is a genuine data point for anyone evaluating OCaml/Reason for performance-sensitive work. Useful if you're building a native UI toolkit or embedding layout in a non-browser context.
The cross-runtime benchmark suite is thorough and honest — same algorithm, different targets, apples-to-apples numbers. Native Reason outperforming C at 0.26ms vs 0.33ms per test is surprising and the methodology is sound enough to trust. The gentest tooling that generates test cases from real browser layout is a smart way to stay spec-compliant without handwriting hundreds of test cases. The C stub/FFI integration path means you can call into this from any language that speaks C ABI.
Last meaningful commit was 2024 but the codebase is effectively frozen — it's a port of a specific Yoga revision, and Yoga itself has moved significantly since. The build tooling is a graveyard of half-migrated systems: jbuilder files sitting next to dune files, npm scripts wrapping esy, a package.json in an OCaml project. Switching between fixed-point and float encodings requires manually editing source files and package.json, which is a sign this was never finished. The README buries actual usage behind benchmarking docs — there's no API reference and no example of integrating this into an actual application.