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>
This commit is contained in:
SpriteandClaude Opus 5.5 committed 2026-11-24 21:23:48 +00:00
1 parent b9d1949688
commit 8c0685fe01
24 files changed
+5856 -1

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
// MoonBit port of Zed's GPUI. See docs/PORTING.md.
name = "experiments/gpui"
version = "0.1.0"
readme = "README.md"
repository = "https://git.site.latha.org/experiments/moon-gpui"
license = "Apache-2.0"
keywords = [ "gui", "ui", "gpui", "layout", "graphics" ]
description = "A MoonBit port of GPUI, Zed's GPU-accelerated UI framework"
source = "src"
preferred_target = "js"