Skip to content

feat(render): add bitty-render crate skeleton (wgpu + crossfont wrapper) - #21

Merged
Xuepoo merged 2 commits into
mainfrom
ctx-0015/feat-bitty-render
Aug 26, 2026
Merged

Xuepoo merged 2 commits into
mainfrom
ctx-0015/feat-bitty-render

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Implements CTX-0015 per ADR-0003 (render row) and ADR-0004 rows
(ADOPT wgpu ~25.x, WRAP crossfont, REJECT skia-safe).

  • Owned public API only: no wgpu/crossfont type crosses the boundary;
    upstream failures flatten into RenderError.
  • frame::plan_frame consumes a generic pixel-domain DamageDescriptor
    (grid wiring from bitty-term-state lands in a later slice).
  • glyph::GlyphRasterizer trait + CrossFontRasterizer wrapper returning
    owned GlyphBitmap values with enforced length invariants.
  • Bounded GlyphCache (wholesale eviction, negative caching) and
    AtlasLayout shelf-pack math; all pure logic unit-tested.
  • gpu::GpuContext::initialize async device creation with owned
    AdapterSummary; window-surface attachment deferred to the
    bitty-platform slice by design.
  • sw-fallback feature: bounded premultiplied-alpha CPU blit seed.
  • Headless-friendly: GPU integration tests self-skip unless
    BITTY_RENDER_GPU_TESTS=1; crate docs state exactly what plain CI
    cannot verify.

#![forbid(unsafe_code)] holds; no bytemuck introduced yet.

Closes #18

CarryCtx: CTX-0015 (team core-foundation)

Xuepoo added 2 commits August 26, 2026 18:22
Implements CTX-0015 per ADR-0003 (render row) and ADR-0004 rows
(ADOPT wgpu ~25.x, WRAP crossfont, REJECT skia-safe).

- Owned public API only: no wgpu/crossfont type crosses the boundary;
  upstream failures flatten into RenderError.
- frame::plan_frame consumes a generic pixel-domain DamageDescriptor
  (grid wiring from bitty-term-state lands in a later slice).
- glyph::GlyphRasterizer trait + CrossFontRasterizer wrapper returning
  owned GlyphBitmap values with enforced length invariants.
- Bounded GlyphCache (wholesale eviction, negative caching) and
  AtlasLayout shelf-pack math; all pure logic unit-tested.
- gpu::GpuContext::initialize async device creation with owned
  AdapterSummary; window-surface attachment deferred to the
  bitty-platform slice by design.
- sw-fallback feature: bounded premultiplied-alpha CPU blit seed.
- Headless-friendly: GPU integration tests self-skip unless
  BITTY_RENDER_GPU_TESTS=1; crate docs state exactly what plain CI
  cannot verify.

Closes #18

CarryCtx: CTX-0015 (team core-foundation)
bitty-render wraps crossfont (ADR-0004), which links FreeType +
fontconfig through pkg-config on Linux. The ubuntu runner image lacks
the -dev packages, so yeslogic-fontconfig-sys's build script cannot
find fontconfig.pc. Install libfontconfig1-dev and libfreetype6-dev
before the Rust gates.

Validated with actionlint and an act -n dry run.
@Xuepoo
Xuepoo force-pushed the ctx-0015/feat-bitty-render branch from c9fd936 to bcc288f Compare August 26, 2026 10:23
@Xuepoo
Xuepoo merged commit cfdc636 into main Aug 26, 2026
5 checks passed
@Xuepoo
Xuepoo deleted the ctx-0015/feat-bitty-render branch August 26, 2026 10:29
@Xuepoo Xuepoo added feat Feature area:package Area: package lifecycle labels Aug 29, 2026
@Xuepoo Xuepoo added this to the v0.0.1 milestone Aug 29, 2026
@Xuepoo Xuepoo added area:render Area: rendering P0 Priority: highest labels Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:package Area: package lifecycle area:render Area: rendering feat Feature P0 Priority: highest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(render): implement bitty-render crate skeleton (wgpu + crossfont wrapper)

1 participant