- layout: port of GPUI's TaffyLayoutEngine (request_layout, request_measured_layout, compute_layout, layout_bounds, stretch_auto_size_to_fill) and LayoutStyle::to_taffy, with rem resolution and device-pixel snapping (round_half_toward_zero, stroke snapping, ceiled measured sizes). No cross-frame node cache yet (needs element ids, M6). - Depend on Milky2018/chicle 0.6.3, the maintained successor of moon_taffy (which no longer compiles), instead of vendoring. - conformance/chicle: standalone module running moon_taffy's 1,038 taffy fixtures against chicle; all pass on wasm, wasm-gc, js and native. - card example now lays out its content with the engine. - Docs: PORTING.md M2 status, revised decision 3, M2 deviations; README; NOTICE attribution for the conformance fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
1.0 KiB
Markdown
26 lines
1.0 KiB
Markdown
# Layout conformance suite
|
|
|
|
1,038 layout fixtures, run against `Milky2018/chicle`, the layout engine
|
|
behind `experiments/gpui/layout`. They are taffy's generated layout fixtures
|
|
(flexbox, grid, block, measured leaves), as ported to MoonBit in
|
|
`Milky2018/moon_taffy@0.5.3` (`src/tests/upstream`). That package no longer
|
|
compiles on the current MoonBit toolchain; its successor, chicle, does.
|
|
|
|
Run this suite before raising the chicle version in the root `moon.mod`:
|
|
|
|
```sh
|
|
cd conformance/chicle
|
|
moon test --target all
|
|
```
|
|
|
|
As of chicle 0.6.3 and moon 0.1.20261119, all 1,038 tests pass on wasm,
|
|
wasm-gc, js and native, in about 40 seconds. The suite is kept outside the
|
|
main module so that `moon test` at the repository root stays fast.
|
|
|
|
The only changes from upstream are the renames `TaffyTree` → `ChicleTree`
|
|
and `TaffyError` → `ChicleError`, and the import paths in `moon.pkg`.
|
|
|
|
License: Apache-2.0. Copyright 2025 International Digital Economy Academy
|
|
(see the file headers). The fixtures derive from taffy
|
|
(https://github.com/DioxusLabs/taffy, MIT).
|