-
|
Hello, sorry for creating issue, I'm trying to test mousefood on stm32h7 mcu and I'm struggling a bit. I was looking into your mousefood-esp32-demo repo and it looks like in last 3 months some api changes happened and for example there is no mousefood::prelude::Terminal already. It is if I'm using git version, if using crates.io version it doesn't want to compile with no_std at all. So the question is in the title, I want to know if it is possible to make it work at the moment. |
Beta Was this translation helpful? Give feedback.
Replies: 25 comments 2 replies
-
|
The latest version on crates.io - v2.1 uses std, but the version on main branch is already You can use the version from git and you will also need a compatible ratatui alpha version: mousefood = { git = "https://github.com/j-g00da/mousefood", rev = "1028ac24f83920fd95a5585a85ef943901ee63ac" }
ratatui = { version = "0.30.0-alpha.5", default-features = false }Then you can import Let me know if you manage to run it on stm32h7! |
Beta Was this translation helpful? Give feedback.
-
|
Ok, it compiles and even tries to display something, but the allocation is huge, I have stm32h723vg with 320kb of ram and 480x320 display and ratatui tries to allocate buffer with full frame size which is to big. Is there a way to make it use partial buffer like for example in LVGL? |
Beta Was this translation helpful? Give feedback.
-
|
I want to make buffer optional in the next release. For now, best you can do is try to render on just part of the display. |
Beta Was this translation helpful? Give feedback.
-
|
It's working |
Beta Was this translation helpful? Give feedback.
-
|
Nice! I can create a temporary branch with buffer turned off completely if you want. |
Beta Was this translation helpful? Give feedback.
-
|
That would be great, because in my case 480x320 is too big for full frame allocation. It's not that big of a deal when you're working with esp32, but stm32 chips have a lot less ram |
Beta Was this translation helpful? Give feedback.
-
|
Hey again, I decided that it would be good to test mousefood with esp32 no_std too, e.g. using esp-hal with embassy, but I'm struggling to compile the project once again, this time it returns an error in kasurai, do you have any idea how to fix that? I thought that it might be related to esp-alloc crate and changed it to embedded-alloc, which I used on stm32, but nothing changed. Also I'm using esp32c3 mcu which is risc-v, not xtensa, may be it's related somehow. |
Beta Was this translation helpful? Give feedback.
-
|
Got it working with the esp32 https://github.com/Hectorban/esp_hal_mousefood
|
Beta Was this translation helpful? Give feedback.
-
|
Had some problems with getting it working async + flush callback but i think that's an specific quirk of the ssd1306 crate which needs |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, ratatui requires allocation, so you need to build alloc. @iamadahn [unstable]
build-std = ["alloc", "core"]Btw. there's an option (on the main branch) now to disable the framebuffer, this way you should be able to draw to the whole screen on your stm32: mousefood = { git = "https://github.com/j-g00da/mousefood", rev = "2c78249e169312a91482d0aac23337c687cf0dfa", default-features = false, features = ["fonts"] }
ratatui = { version = "0.30.0-alpha.5", default-features = false } |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for clarification, will test soon |
Beta Was this translation helpful? Give feedback.
-
|
Tried with the esp32c6 and got what i think is memory alignment/size issues. https://github.com/Hectorban/esp_hal_mousefood_esp32c6/tree/main |
Beta Was this translation helpful? Give feedback.
-
Update:
Sadly no idea about this one right now. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
@j-g00da I have finally tested new commit without framebuffer that you provided and so far everything works flawlessly, I was able to use full 480x320 resolution with just 128kb of heap for everything, while before it was like 256kb of heap for 480x60. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for letting me know! Btw. Can you share a photo of mousefood running on a bigger display? :) |
Beta Was this translation helpful? Give feedback.
-
|
Sure |
Beta Was this translation helpful? Give feedback.
-
|
@j-g00da I've encountered a strange issue, if I try to build the project in release mode I have a strange errors in ratatui-widgets and ratatui-core: It happens even if remove everything from |
Beta Was this translation helpful? Give feedback.
-
|
Hmm there seems to be a version incompatibility somehow 🤔 Some things you can check:
|
Beta Was this translation helpful? Give feedback.
-
|
Yes, you are right, I deleted cargo registry to redownload all crates and now everything builds correctly, ty for help |
Beta Was this translation helpful? Give feedback.
-
|
Got a ST7796 320×480 working with a esp32. Needed to use the IBM437_9X14_REGULAR font and the disabled framebuffer for it to run with the limited heap:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Great! I'll try to clean some things up and release a new version with ratatui 0.30 and no-std support by the end of January :) |
Beta Was this translation helpful? Give feedback.
-
|
I guess it's time to close the issue, the dream is now true. However, I wonder if there is way to use touch input with mousefood, is there a way to somehow detect which widget is being pressed? |
Beta Was this translation helpful? Give feedback.
-
|
Short answer: Yes, this is usable in no-std environments starting from mousefood 0.3.0 and ratatui 0.30.0 (January 2026) |
Beta Was this translation helpful? Give feedback.







Short answer: Yes, this is usable in no-std environments starting from mousefood 0.3.0 and ratatui 0.30.0 (January 2026)