A Rust terminal rendering library.

fireworks gif logo snake gif

The library features a set of drawing primitives that can be used to create interactive terminal games and applications. The primitives range from drawing simple text to drawing sub-cell precision using unicode characters.

Germterm's rendering pipeline does real alpha compositing, which allows for drawing with transparency. This opens the door for many unique visual effects, as terminal emulators don't typically support colors with transparency.

alpha blending gif


Technical overview

A brief rundown over the rendering pipeline:

  1. Layered draw queues are flattened. This does not require sorting.
  2. OOB calls are handled and discarded.
  3. Flattened draw queue is fed into the compositor.
    1. Previous characters and attributes may be preserved or overridden.
    2. Background and foreground colors are blended contextually.
    3. Characters and colors may be merged depending on format.
  4. Framebuffer is diffed to reduce terminal IO.
  5. Diffs are flushed to stdout via crossterm.
Acknowledgements

Big thanks to the awesome developers behind crossterm.

Their work made this project possible.