Skip to main content

Module ring_buffer

Module ring_buffer 

Source
Expand description

Zero-allocation shared-memory ring buffer for paint commands. Zero-allocation shared-memory ring buffer for plugin paint commands.

The host and the WebAssembly guest share a single linear memory region. The guest writes raw PluginPaintCmd records followed by their payload directly into the buffer, and the host consumes them by parsing in place, avoiding any per-frame allocation or serialization overhead.

Structs§

PluginPaintCmd
A raw paint command produced by a WebAssembly plugin.
PluginRingBuffer
A circular command buffer backed by a shared linear memory slice.

Enums§

RingBufferError
Errors that can occur while writing into a PluginRingBuffer.

Constants§

DEFAULT_CAPACITY
Default size of the shared linear memory ring buffer (256 KiB).