vemu.

React API

Public API of @swedishembedded/vemu-react v0.10.0- generated from the package's TypeScript source.

Hooks

Own the emulator lifecycle: loading, the frame loop, I/O wiring, and peripheral state.

Components

Drop-in UI: display canvas, serial terminal, and peripheral inspector panels.

GenericInspector

Default inspector view used for any peripheral that has no domain-specific view registered in `PERIPHERAL_VIEWS`. Renders the raw snapshot field map, pretty-printing any JSON-string fields. This is what makes "implement the inspector, see it in the UI" work before a custom view exists. Accepts the uniform PeripheralViewProps shape, so it can stand in for any registered view.

PeripheralPanel

Generic peripheral inspector panel. A permanent section (like Display and Console): it always renders, lists whatever inspectable peripherals the live machine exposes, and shows a domain-specific view when registered, otherwise the generic fallback. Empty/error states keep it visible and diagnosable.

PeripheralSelector

Vertical list of inspectable peripherals (the left pane of PeripheralPanel). Renders human-friendly labels via `peripheralLabel` and highlights the current selection.

VemuCanvas

Pixel-perfect display surface for the emulator's video output. Registers a draw callback that blits each RGBA frame into a 2D canvas, resizing the backing store whenever the frame dimensions change, and shows a "NO SIGNAL" overlay until the first frame arrives.

VemuConsole

The whole vemu embed in one component: boots `firmware` on `board` and renders a terminal bound to its UART. No board picker, no file loader, no controls - point it at a board id and a firmware URL.

VemuTerminal

xterm.js console bound to the emulator's UART. Machine output is written to the terminal; keystrokes are passed through raw (picocom-style) as UART input. Auto-fits to its container and re-fits on resize.

Registry & Helpers

The peripheral-view registry and helpers for extending the inspector with your own views.

Types

Contracts you implement or consume - view props, hook results, loader injection.