@mwillbanks/tuil-cell
Pure Bun cell renderer with an explicit native diff profiling boundary.
Overview
Pure Bun cell renderer with an explicit native diff profiling boundary.
@mwillbanks/tuil-cell is independently installable and also participates in the
umbrella @mwillbanks/tuil runtime where applicable.
Installation
npm install @mwillbanks/tuil-cellHow it operates
The cell backend composes grapheme-aware buffers, preserves wide-character continuation cells, diffs frames, and emits minimal ANSI output. The TypeScript path is the default. Zig prebuilds expose an explicit conformance and profiling prototype, and applications must opt in because the prototype does not replace the complete diff and encoding workload.
API
| API | Signature | Description |
|---|---|---|
Cell | interface Cell | Public interface Cell. |
CellAccelerator | interface CellAccelerator | Public interface CellAccelerator. |
CellAttributes | interface CellAttributes | Public interface CellAttributes. |
CellBuffer | class CellBuffer | Public class CellBuffer. |
CellFrame | interface CellFrame | Public interface CellFrame. |
CellOutputMode | type CellOutputMode | Public type CellOutputMode. |
CellRendererBackend | class CellRendererBackend | Public class CellRendererBackend. |
CellRendererBackendOptions | interface CellRendererBackendOptions | Public interface CellRendererBackendOptions. |
CellSceneNode | interface CellSceneNode | Public interface CellSceneNode. |
CellTree | type CellTree | Public type CellTree. |
Color | type Color | Public type Color. |
composeCellScene | function composeCellScene | Public function composeCellScene. |
CursorState | interface CursorState | Public interface CursorState. |
defaultColor | constant defaultColor | Public constant defaultColor. |
diffCellFrames | function diffCellFrames | Public function diffCellFrames. |
emptyCell | constant emptyCell | Public constant emptyCell. |
encodeCellOutput | function encodeCellOutput | Public function encodeCellOutput. |
loadNativeCellAccelerator | function loadNativeCellAccelerator | Public function loadNativeCellAccelerator. |
loadOptionalCellAccelerator | function loadOptionalCellAccelerator | Public function loadOptionalCellAccelerator. |
NativeCellAcceleratorOptions | interface NativeCellAcceleratorOptions | Public interface NativeCellAcceleratorOptions. |
typescriptCellAccelerator | constant typescriptCellAccelerator | Public constant typescriptCellAccelerator. |
Events and lifecycle
The backend consumes renderer lifecycle and input contracts; it does not introduce an application event bus.
All subscriptions and registrations return a disposer or belong to an owning runtime that disposes them in reverse order.
Example
import { CellBuffer } from "@mwillbanks/tuil-cell";
const buffer = new CellBuffer(80, 24);
buffer.write(0, 0, "Ready");