This document lists all breaking changes along with tips to help you migrate smoothly.
- unreleased
- v0.5.0
underline-colorfeature is now opt-in
- v0.4.0
framebuffermodule is no longer part of the public API
- v0.3.0
- Feature
simulatoris removed - Type of
EmbeddedBackendConfig::font_boldis nowOption<MonoFont<'static>> EmbeddedBackendConfignow requires providingfont_italicratatuiis no longer re-exportedEmbeddedBackendnow usesmousefood::error::Errorinstead ofstd::io::Errorfor error handling- The MSRV is now 1.85.0
- Feature
- v0.2.0
EmbeddedBackend::with_fontconstructor removedEmbeddedBackend::newnow requires aconfigparameterfonts::BASIC_6X10renamed tofonts::MONO_6X10
- v0.1.0
EmbeddedBackend::newnow takes different arguments
- v0.0.1 - initial release
underline-color feature is now opt-in (#166)
The underline-color feature was previously enabled by default. It is now opt-in to save 8 bytes
per terminal cell (4 bytes per cell in Ratatui's two Vec<Cell> buffers), which also reduces
bandwidth on memory-constrained embedded hardware.
If you use per-cell underline colors, enable the feature explicitly:
[dependencies]
- mousefood = "0.4.0"
+ mousefood = { version = "0.5.0", features = ["underline-color"] }If you don't use underline colors, no changes are needed.
New fields on EmbeddedBackendConfig (#172)
EmbeddedBackendConfig has two new fields: cursor (CursorConfig) and blink (BlinkConfig,
behind the blink feature flag). Since the struct is exhaustive, this is a breaking change for
anyone constructing it directly.
let config = EmbeddedBackendConfig {
flush_callback: Box::new(|_| {}),
font_regular: default_font,
font_bold: None,
font_italic: None,
vertical_alignment: TerminalAlignment::Start,
horizontal_alignment: TerminalAlignment::Start,
color_theme: ColorTheme::default(),
+ cursor: CursorConfig::default(),
+ blink: BlinkConfig::default(),
};If you use ..Default::default(), no changes are needed.
framebuffer module is no longer part of the public API (#149)
Feature simulator is removed (#83)
The feature simulator is removed to simplify code of the crate.
An example crate was added in examples/simulator to restore functionality of the feature.
Migration guide:
If you were using the simulator feature:
[dependencies]
- mousefood = { version = "0.2.1", features = ["simulator"] }
+ mousefood = "0.3.0"
+ embedded-graphics-simulator = "0.6.0"- use mousefood::simulator::SimulatorDisplay;
+ use embedded_graphics_simulator::SimulatorDisplay;See the example in examples/simulator/ for a complete migration example.
Type of EmbeddedBackendConfig::font_bold is now Option<MonoFont<'static>> (#57)
Previously, font_bold was a required MonoFont<'static>. Now it's optional to allow
configurations where bold text is not needed or uses the same font as regular text.
Migration guide:
let config = EmbeddedBackendConfig {
- font_bold: mousefood::fonts::MONO_6X13_BOLD,
+ font_bold: Some(mousefood::fonts::MONO_6X13_BOLD),
// ...other fields
};If you don't need bold text support, you can set it to None:
let config = EmbeddedBackendConfig {
font_bold: None,
// ...other fields
};EmbeddedBackendConfig now requires providing font_italic (#57)
The font_italic field was added to EmbeddedBackendConfig to support italic text rendering. This
field is optional and can be set to None if italic text support is not needed.
Migration guide:
let config = EmbeddedBackendConfig {
font_regular: mousefood::fonts::MONO_6X13,
font_bold: Some(mousefood::fonts::MONO_6X13_BOLD),
+ font_italic: None, // or Some(your_italic_font),
// ...other fields
};If you have an italic font available:
let config = EmbeddedBackendConfig {
font_regular: mousefood::fonts::MONO_6X13,
font_bold: Some(mousefood::fonts::MONO_6X13_BOLD),
+ font_italic: Some(mousefood::fonts::MONO_6X13_ITALIC),
// ...other fields,
};ratatui is no longer re-exported (#60)
Mousefood now depends on ratatui-core crate instead of ratatui and doesn't
re-export it. Downstream crates should now depend on ratatui directly.
Migration guide:
[dependencies]
- mousefood = "0.2.1"
+ mousefood = "0.3.0"
+ ratatui = { version = "0.30.0", default-features = false }- use mousefood::ratatui::Terminal;
+ use ratatui::Terminal;EmbeddedBackend now uses mousefood::error::Error instead of std::io::Error for error handling (#60)
The backend now uses a custom error type that better represents the kinds of errors that can occur in embedded graphics contexts.
Migration guide:
- use std::io::Error
+ use mousefood::error::ErrorThe MSRV is now 1.85.0 (#65)
The minimum supported Rust version has been updated to 1.85.0 to support Rust 2024 edition and latest language features.
Migration guide:
Ensure your Rust toolchain is at least version 1.85.0:
rustup update
rustc --version # should show 1.85.0 or higherEmbeddedBackend::with_font constructor removed (#48)
The with_font constructor was removed in favor of the more flexible config-based approach.
Migration guide:
- let backend = EmbeddedBackend::with_font(&mut display, font);
+ let config = EmbeddedBackendConfig {
+ font_regular: font,
+ ..Default::default()
+ };
+ let backend = EmbeddedBackend::new(&mut display, config);EmbeddedBackend::new now requires a config parameter (#48)
The constructor now takes a configuration struct for better extensibility.
Migration guide:
- let backend = EmbeddedBackend::new(&mut display);
+ let backend = EmbeddedBackend::new(&mut display, EmbeddedBackendConfig::default());For custom configurations:
let config = EmbeddedBackendConfig {
font_regular: your_font,
..Default::default()
};
let backend = EmbeddedBackend::new(&mut display, config);fonts::BASIC_6X10 renamed to fonts::MONO_6X10 (#26)
The font constant was renamed to better reflect its monospace nature.
Migration guide:
- use mousefood::fonts::BASIC_6X10;
+ use mousefood::fonts::MONO_6X10;let config = EmbeddedBackendConfig {
- font_regular: BASIC_6X10,
+ font_regular: MONO_6X10,
// ...other fields
};The new constructor was simplified to take fewer parameters and use sensible defaults.
Migration guide:
- let backend = EmbeddedBackend::new(&mut display, font_regular, font_bold);
+ let backend = EmbeddedBackend::new(&mut display);Or if you need to specify custom fonts:
- let backend = EmbeddedBackend::new(&mut display, font_regular, font_bold);
+ let backend = EmbeddedBackend::with_font(&mut display, font_regular, font_bold);