Mousefood - embedded-graphics backend for Ratatui!

Quickstart
Add mousefood as a dependency:
cargo add mousefood
Exemplary setup:
use *;
Special characters
Embedded-graphics includes bitmap fonts that have a very limited set of characters to save space (ASCII, ISO 8859 or JIS X0201). This makes it impossible to draw most of Ratatui's widgets, which heavily use box-drawing glyphs, Braille, and other special characters.
Mousefood by default uses embedded-graphics-unicodefonts,
which provides embedded-graphics fonts with a much larger set of characters.
Alternatives
In order to save space and speed up rendering,
the fonts feature can be disabled by turning off the default crate features.
ibm437 is a good alternative that includes
some drawing characters, but is not as large as embedded-graphics-unicodefonts.
Simulator
Mousefood can be run in a simulator
(requires SDL2 to be installed).
The simulator mode can be enabled using the simulator feature and utilizes the
embedded-graphics-simulator
crate.
Run simulator example:
git clone https://github.com/j-g00da/mousefood.git
cd mousefood
cargo run --example=simulator --features=simulator
Exemplary setup using simulator:
use *;
use geometry;
use SimulatorDisplay;
Performance and hardware support
Flash memory on most embedded devices is very limited. Additionally,
to achieve high frame rate when using the fonts feature,
it is recommended to use opt-level = 3,
which can make the resulting binary even larger.
Mousefood is hardware-agnostic, but may not work on low-end or ultra-low-power devices due to resource limitations. It is recommended to use devices with at least 1MB of flash.
Mousefood was successfully tested on following MCUs:
- esp32 (base model, 4MB flash)
- esp32c6 (16MB flash)
Docs
Full API docs are available on docs.rs.
License
Mousefood is dual-licensed under Apache 2.0 and MIT terms.