gitmyhub

tui-globe

Rust ★ 26 updated 20d ago

3D globe ratatui widget rendered with braille

A Rust library that draws a spinning 3D globe inside your terminal using braille dot characters, built as a Ratatui widget with public-domain map data baked in at compile time.

RustRatatuiBraille renderingNatural EarthPythonCargosetup: easycomplexity 3/5

tui-globe is a Rust library that renders a spinning 3D globe inside a terminal window. Terminals can only display text characters, so this library uses braille characters (the dot-pattern symbols used in accessible text) to draw fine-detail graphics that approximate a smooth image. The result is an animated globe you can embed in terminal-based applications.

It is built as a widget for Ratatui, which is a Rust framework for creating visual interfaces that run entirely in the terminal without a graphical window. Developers add tui-globe as a component in their own terminal apps to display a rotating Earth.

The globe's geographic data comes from Natural Earth, a public domain dataset of coastlines and country borders. That data is baked into the compiled binary at build time, so the finished program does not need to download or read external map files at runtime. You can choose between three levels of detail (coarse for a minimal overview, medium for a standard view, or fine for a dense mesh) and can optionally include or exclude country and state/province border lines.

Installing the demo is one command: cargo install tui-globe, which uses Rust's standard package manager. Regenerating the geometry data, if you want to use different source maps or adjust detail levels, requires a separate Python script with a few dependencies.

The code is licensed under GPL-3.0. The bundled map data is public domain from Natural Earth.

Where it fits