M2: layout — LayoutEngine on Milky2018/chicle, 1,038-fixture conformance suite (#3)

This commit was merged in pull request #3.
This commit is contained in:
nandi committed 2026-11-24 22:14:04 +00:00
1 parent 10ee6d1f21
commit b5daf13d47
60 files changed
+46155 -27

No files matched your search

+9 -1
View File
@@ -15,11 +15,13 @@ roadmap.
| `experiments/gpui/scene` | `scene.rs`, `bounds_tree.rs` | Ported (primitives, draw ordering, layers, batching, replay) |
| `experiments/gpui/font` | font descriptors in `text_system.rs` | Ported (`Font`, weights, styles, features, fallbacks) |
| `experiments/gpui/style` | `style.rs`, `styled.rs`, Refineable, gpui_macros style helpers | Ported (`Style`/`StyleRefinement`, the full `Styled` fluent API) |
| `experiments/gpui/layout` | `taffy.rs` | Ported on [`Milky2018/chicle`](https://mooncakes.io/docs/Milky2018/chicle) (flexbox, grid, block) |
## Example
Nothing renders yet. `src/examples/card` resolves a style written with
GPUI's fluent API, paints it into a `Scene` by hand, and prints the draw
GPUI's fluent API, lays the card and its (fake-measured) text out with the
layout engine, paints it into a `Scene`, and prints the layout and the draw
batches:
```sh
@@ -49,6 +51,12 @@ script or `src/style/styled.mbt`, then run:
python3 tools/gen_style.py && moon fmt
```
## Layout conformance
`conformance/chicle` is a standalone module with 1,038 taffy layout fixtures
for the layout engine dependency. Run it before changing the chicle version:
`cd conformance/chicle && moon test --target all`.
## Testing
All packages are pure MoonBit and are tested on every backend: