SpriteandClaude Opus 5.5 8c0685fe01 Add porting plan and first pure slice: geometry, color, scene
docs/PORTING.md maps GPUI's architecture onto MoonBit packages, separates
pure logic from platform code, surveys mooncakes packages and their backends,
recommends a js + Canvas2D first backend behind a small Platform trait, lists
the Rust idioms that need a different design, and gives an ordered roadmap.

First slice (pure, tested on wasm, wasm-gc, js and native):
- geometry: Pixels/ScaledPixels/DevicePixels/Rems, Absolute/Definite/Length
  with parsing, Point/Size/Bounds/Edges/Corners, Anchor, Axis, ContentMask
- color: Rgba/Hsla with conversions, hex parsing, blending, Background
  (solid, linear gradient, patterns)
- scene: primitives (Quad, Shadow, Path, Underline, sprites), transformation
  matrix, BoundsTree draw ordering, layers, finish/batches, replay

Derived from Zed's GPUI (Apache-2.0); see LICENSE and NOTICE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 21:23:48 +00:00

moon-gpui

A port of GPUI, the GPU-accelerated UI framework of the Zed editor, to MoonBit.

Status: early. The pure-logic foundation is in place; nothing renders yet. See docs/PORTING.md for the architecture mapping and the roadmap.

Package GPUI source Status
experiments/gpui/geometry geometry.rs, ContentMask Ported (units, Point/Size/Bounds/Edges/Corners, lengths)
experiments/gpui/color color.rs Ported (Rgba/Hsla, hex parsing, Background)
experiments/gpui/scene scene.rs, bounds_tree.rs Ported (primitives, draw ordering, layers, batching, replay)

All packages are pure MoonBit and are tested on every backend:

moon check --target all
moon test --target all
moon fmt

License

Apache-2.0, like GPUI itself. See LICENSE and NOTICE.

S
Description
Port of Zed's GPUI GPU-accelerated UI framework to MoonBit
Readme
665 KiB
0 Stars 1 Watchers 0 Forks
Languages
MoonBit 99%
Python 1%