render: start felis-render-core with the renderer-neutral types #171

Merged
natsukium merged 2 commits from render/core-crate into main 2026-10-18 19:46:57 +09:00
Owner

Second of four PRs extracting the wgpu-free half of felis-render-wgpu into a new felis-render-core crate. Pure moves, no behavior change; the #170 golden fixtures pass untouched.

  • New crate felis-render-core (deps: protocol, grid, shaping): palette, box_drawing, atlas (+ proptest_atlas) moved by git mv; SelectionRange, ImageData, ImageSource at its root; the overlay structs in overlay. Callers in felis-render-wgpu and felis-client import from core directly, no re-export shims.
  • deny.toml: wgpu allowed only under felis-render-wgpu, winit only under felis-client (wrappers). Core can't take felis-render-wgpu as a normal dependency without a cycle, so this keeps core's production graph off both. Chosen over a cargo tree test because such a test reaches above its crate root and would ship in the package once crates are published. Verified: passes on the graph; fails on a direct and on a cfg(windows) violation.
  • Docs: workspace.md crate map, diagram, extraction sets, reuse paths, enforcement sentence; overview.md crate-boundary record; CONTRIBUTING scope row; bench/fuzz path filters.

Next: phase 3 moves GlyphIndex (shape memo, rasterization, shelf atlas) into core; phase 4 moves the cell painter behind a per-row display list.

Verified: just check green locally (one known-flaky crossterm_test.py race, passed on rerun); sol review PASS, its one non-blocking finding fixed in the last commit.

Second of four PRs extracting the wgpu-free half of `felis-render-wgpu` into a new `felis-render-core` crate. Pure moves, no behavior change; the #170 golden fixtures pass untouched. - New crate `felis-render-core` (deps: protocol, grid, shaping): `palette`, `box_drawing`, `atlas` (+ `proptest_atlas`) moved by `git mv`; `SelectionRange`, `ImageData`, `ImageSource` at its root; the overlay structs in `overlay`. Callers in `felis-render-wgpu` and `felis-client` import from core directly, no re-export shims. - `deny.toml`: `wgpu` allowed only under `felis-render-wgpu`, `winit` only under `felis-client` (`wrappers`). Core can't take `felis-render-wgpu` as a normal dependency without a cycle, so this keeps core's production graph off both. Chosen over a `cargo tree` test because such a test reaches above its crate root and would ship in the package once crates are published. Verified: passes on the graph; fails on a direct and on a `cfg(windows)` violation. - Docs: workspace.md crate map, diagram, extraction sets, reuse paths, enforcement sentence; overview.md crate-boundary record; CONTRIBUTING scope row; bench/fuzz path filters. Next: phase 3 moves `GlyphIndex` (shape memo, rasterization, shelf atlas) into core; phase 4 moves the cell painter behind a per-row display list. Verified: `just check` green locally (one known-flaky `crossterm_test.py` race, passed on rerun); sol review PASS, its one non-blocking finding fixed in the last commit.
render, docs, skills: pin the cell instance bytes and paint cost
All checks were successful
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 14s
windows / windows docs-only no-op (pull_request) Has been skipped
bench / instruction-count regression gate (pull_request) Successful in 47s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 50s
darwin / build felis (aarch64-darwin) (pull_request) Successful in 2m40s
pr / nix flake check (pull_request) Successful in 1m19s
windows / cargo nextest (Windows) (pull_request) Successful in 3m55s
pr / cargo build / clippy / test / deny (pull_request) Successful in 1m41s
pr / wire schema is compatible with the base (pull_request) Successful in 3s
windows / frontend smoke (Windows) (pull_request) Successful in 38s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 29s
windows / cargo clippy (Windows cross) (pull_request) Successful in 15s
a06fc10600
The renderer-neutral half of felis-render-wgpu (painter, glyph index,
palette) is about to move into its own crate, and glyph sources will
switch from normalized uv to atlas pixels. Neither change may alter
what reaches the GPU, and the painter's unit tests assert fields
against a mock atlas, so they cannot show that.

RowCache::paint_frame is now the one path from a screen and its frame
state to the uploaded instances; the renderer and a byte-level golden
test both go through it, the test over a real GlyphIndex at the
production atlas sides. The paint_frame bench records the full,
one-row and cursor-move costs the move is measured against.

Assisted-by: Claude Code
Half of felis-render-wgpu never names a wgpu type, yet a client that does
not use wgpu has to re-derive it, and the browser client's hand port of the
box-drawing rasterizer already lags the native one. A crate without wgpu
or winit is the seam a CPU backend and other clients can reuse instead.
The palette, box drawing, shelf atlas, selection, overlay and image-source
types move first, unchanged; the pinned instance bytes stay identical.

The no-wgpu/no-winit rule is a deny.toml wrappers entry rather than a
cargo-tree test inside the crate: such a test reaches above its own crate
root and would ship in the package once the crate is published.

Assisted-by: Claude Code
docs: describe what felis-render-core holds today
All checks were successful
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 10s
windows / windows docs-only no-op (pull_request) Has been skipped
bench / instruction-count regression gate (pull_request) Successful in 46s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 50s
darwin / build felis (aarch64-darwin) (pull_request) Successful in 2m40s
pr / nix flake check (pull_request) Successful in 1m18s
windows / cargo nextest (Windows) (pull_request) Successful in 2m47s
windows / frontend smoke (Windows) (pull_request) Successful in 1m3s
pr / cargo build / clippy / test / deny (pull_request) Successful in 1m58s
pr / wire schema is compatible with the base (pull_request) Successful in 3s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 31s
windows / cargo clippy (Windows cross) (pull_request) Successful in 28s
203dbea197
The crate-boundary record claimed the core already spares a CPU
backend from re-deriving how a cell looks, but the cell painter is
still in felis-render-wgpu; name the pieces the core holds instead.

Assisted-by: Claude Code
natsukium deleted branch render/core-crate 2026-10-18 19:46:57 +09:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
felis-terminal/felis!171
No description provided.