mastodon verification

Are We Embedded Yet? #1

This series is meant to document and promote the joint effort of making ratatui truly portable.

Update: no_std ratatui


Backend::Error merged! One of the blockers for no_std ratatui was the explicit use of std::io::Error in Backend (and by extension, in Terminal as well). Now, Backend implementations must define an associated Error type. Built-in backends will still use std::io::Error, but third-party ones like mousefood can now use a different error type - which will enable a proper no_std compatibility!

I'm actually working on a follow-up PR and ran into a pretty interesting issue, so if anyone reading this has ideas, feel free to jump in and comment.

As for the layout cache problem I mentioned in the last post - since there's no great solution, the decision for now is to simply not provide a cache in no_std mode. When this is merged, the last things left would be just few minor tweaks and adding std feature flag.

We are one step closer to no_std ratatui.
██████████████████░░ 90%

Update: mousefood


Mousefood recently got italic modifier support as well as readme section about bold/italic fonts that also points out some limitations. Additionally, v0.2.1 patch was released that mainly targeted some inaccuracies in the docs.

bold and italic fonts on mousefood Bold and italic modifiers in mousefood, italic will be available with the next release.

The development of mousefood may be a bit slower right now, as I'm focusing on finalizing no_std support in Ratatui - but I'm still making sure to work on it regularly. If you'd like to help out, feel free to reach out!

Full changelog of v0.2.1:

🚜 Refactor

  • (examples) Remove unnecessary extern crate from simulator example

📚 Documentation

  • (readme) Fix simulator code snippet

⚙️ Miscellaneous Tasks

  • (examples) Configure simulator example in Cargo.toml
  • Update list of excluded paths in Cargo.toml

soft_ratatui


Software rendering backend for ratatui. No GPU required. TUI everywhere.

Another new Ratatui backend just dropped - soft_ratatui by @gold-silver-copper, the creator of egui_ratatui. The crate uses tiny-skia to render efficiently directly to a window, ditching the terminal emulator completely. This allows for much higher frame rates out of the box (up to 200 FPS). It will be especially useful for TUI games or interactive tools where smooth performance really matters!

Soft_ratatui is under heavy development and I was told that it will eventually move away from tiny-skia in favor of a custom lightweight renderer.

colors_rgb example running at 140 FPS using soft_ratatui

colors_rgb running at over 140 FPS, "s" in "fps" gets cut off as the example doesn't expect that many digits!

Thanks!


Huge thanks for the response to the last post - it got way more attention than I expected, and even made its way into This Week in Rust #596 and The Embedded Rustacean #44. Thanks to everyone who helped spread Ratatui even further!

Are We Embedded Yet? #0

Ratatui gave us beautiful TUIs.
Ratzilla expanded it to the web.
But why shall we stop there?
Why shall we stop anywhere?

Are We Embedded Yet?

This series is meant to document and promote the joint effort of making ratatui truly portable.

no_std ratatui


I've started the discussion on making ratatui-core crate no_std just two weeks ago, when I realized that mousefood can't become anything more than just a gimmick without few upstream changes. Today, thanks to commitment of the maintainers and help from the community, I'm pretty optimistic that we can see ratatui on stm32 in just few weeks. And I'm not talking about just ratatui-core (which was planned for the "first stage"), but ratatui-widgets is no_std already!

Check out the tracking issue!

The last major thing to resolve is to provide an alternative, no_std implementation of layout caching.

mousefood


Mousefood v0.2 is out! This is the point, where the project stops being just a proof of concept and due to that, most of the changes since v0.1 are refactoring ones. I decided that this also is the time to finally write tests - currently coverage is just around 60%, but this should greatly improve in the coming weeks. This doesn't mean there are no new features! The new version comes with an optional support of EPDs!

mousefood on epd

More on that in the docs.

What's next?

The obvious next step after ratatui becoming no_std would be adapting mousefood to use that and testing it out on some previously unsupported device (I actually already have a stm32f7 waiting for that.) But there is still a lot of other things to complete in mousefood such as cursor support (currently cursor is hardcoded at (0,0) and hidden), handling the rest of modifiers (there's a PR by @y5 waiting for the next release of ratatui that will also add colored underlines) or color conversion from indexed colors. I also want to eventually add terminal themes.

Also I want to finally start writing some actual apps using it, instead of just demos! I've got some interesting ideas for that, but first I need to find some more time... If you haven't seen already, @micielski actually managed to read IRC messages on esp32 and display them on SPI screen using mousefood!

ratatui-uefi


Something I didn’t know until recently: there are UEFI targets with std support in nightly Rust. Even crazier - just a few days ago, I didn’t expect to see Ratatui running in UEFI this week! Check out @reubeno's new ratatui backend - ratatui-uefi and a companion crate for handling inputs - terminput-uefi A truly amazing project that opens doors to some fun ideas.

mousefood

About me

j-g00da

Hi!
I’m Jagoda — a full-stack developer, open source enthusiast, self-proclaimed artist, and full-time tinkerer.
Mostly a tinkerer.

🏗 Currently working on:

This page might get an update someday. Maybe. We’ll see.