{"id":26555222,"url":"https://github.com/j-g00da/mousefood","last_synced_at":"2025-07-15T05:35:50.140Z","repository":{"id":283058148,"uuid":"950531141","full_name":"j-g00da/mousefood","owner":"j-g00da","description":"embedded-graphics backend for Ratatui","archived":false,"fork":false,"pushed_at":"2025-07-11T20:53:00.000Z","size":4445,"stargazers_count":291,"open_issues_count":28,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T22:23:57.147Z","etag":null,"topics":["embedded-graphics","ratatui","rust","tui"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j-g00da.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"j-g00da","buy_me_a_coffee":"j.g00da"}},"created_at":"2025-03-18T10:00:47.000Z","updated_at":"2025-07-11T20:53:04.000Z","dependencies_parsed_at":"2025-05-01T20:29:03.106Z","dependency_job_id":"82001149-104e-46fd-a8ff-797c0107bff8","html_url":"https://github.com/j-g00da/mousefood","commit_stats":null,"previous_names":["j-g00da/mousefood"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/j-g00da/mousefood","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-g00da%2Fmousefood","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-g00da%2Fmousefood/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-g00da%2Fmousefood/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-g00da%2Fmousefood/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j-g00da","download_url":"https://codeload.github.com/j-g00da/mousefood/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-g00da%2Fmousefood/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264909907,"owners_count":23682090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded-graphics","ratatui","rust","tui"],"created_at":"2025-03-22T10:25:28.421Z","updated_at":"2025-07-15T05:35:50.116Z","avatar_url":"https://github.com/j-g00da.png","language":"Rust","funding_links":["https://github.com/sponsors/j-g00da","https://buymeacoffee.com/j.g00da"],"categories":["Rust","📦 Libraries"],"sub_categories":["🏗️ Frameworks"],"readme":"# ![Mousefood](https://github.com/j-g00da/mousefood/blob/599f1026d37c8d6308a6df64a234dbefaedc0c6f/assets/logo/mousefood.svg?raw=true)\n\n[![Crate](https://img.shields.io/crates/v/mousefood?logo=rust\u0026style=flat-square\u0026color=ebe94f)](https://crates.io/crates/mousefood)\n[![Docs](https://img.shields.io/docsrs/mousefood?logo=rust\u0026style=flat-square)](https://docs.rs/mousefood)\n[![CI](https://img.shields.io/github/actions/workflow/status/j-g00da/mousefood/ci.yml?style=flat-square\u0026logo=github)](https://github.com/j-g00da/mousefood/blob/main/.github/workflows/ci.yml)\n[![Deps](https://deps.rs/crate/mousefood/latest/status.svg?style=flat-square)](https://deps.rs/crate/mousefood)\n\n**Mousefood** - a no-std\n[embedded-graphics](https://crates.io/crates/embedded-graphics) backend\nfor [Ratatui](https://crates.io/crates/ratatui)!\n\n\u003cdiv align=\"center\"\u003e\n\n![demo](https://github.com/j-g00da/mousefood/blob/599f1026d37c8d6308a6df64a234dbefaedc0c6f/assets/demo.jpg?raw=true)\n![animated demo](https://github.com/j-g00da/mousefood/blob/599f1026d37c8d6308a6df64a234dbefaedc0c6f/assets/demo.gif?raw=true)\n\n\u003c/div\u003e\n\n## Quickstart\n\nAdd mousefood as a dependency:\n\n```shell\ncargo add mousefood\n```\n\nExemplary setup:\n\n```rust\nuse mousefood::prelude::*;\n\nfn main() -\u003e Result\u003c(), std::io::Error\u003e {\n    // Any embedded_graphics DrawTarget\n    let mut display = MyDrawTarget::new();\n    \n    let backend = EmbeddedBackend::new(\u0026mut display, EmbeddedBackendConfig::default());\n    let mut terminal = Terminal::new(backend)?;\n\n    loop {\n        terminal.draw(...)?;\n    }\n}\n```\n\n### Special characters\n\nEmbedded-graphics includes bitmap fonts that have a very limited\nset of characters to save space (ASCII, ISO 8859 or JIS X0201).\nThis makes it impossible to draw most of Ratatui's widgets,\nwhich heavily use box-drawing glyphs, Braille,\nand other special characters.\n\nMousefood by default uses [`embedded-graphics-unicodefonts`](https://crates.io/crates/embedded-graphics-unicodefonts),\nwhich provides embedded-graphics fonts with a much larger set of characters.\n\n#### Alternatives\n\nIn order to save space and [speed up rendering](#performance-and-hardware-support),\nthe `fonts` feature can be disabled by turning off the default crate features.\n[`ibm437`](https://crates.io/crates/ibm437) is a good alternative that includes\nsome drawing characters, but is not as large as embedded-graphics-unicodefonts.\n\n### Bold and italic fonts\n\nBold and italic modifiers are supported, but this requires providing fonts\nthrough `EmbeddedBackendConfig`.\nIf only regular font is provided, it serves as a fallback.\nAll fonts must be of the same size.\n\n```rust\nuse mousefood::{EmbeddedBackend, EmbeddedBackendConfig, fonts};\n\nlet config = EmbeddedBackendConfig {\n    font_regular: fonts::MONO_6X13,\n    font_bold: Some(fonts::MONO_6X13_BOLD),\n    font_italic: Some(fonts::MONO_6X13_ITALIC),\n    ..Default::default()\n};\nlet backend = EmbeddedBackend::new(\u0026mut display, config);\n```\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg alt=\"Bold and Italic fonts\"\n     src=\"https://github.com/j-g00da/mousefood/blob/6640da9402794ea8f9370e0dc2b4bd1ebf2c6356/assets/bold_italic.png?raw=true\"\n     style=\"max-width: 640px\"/\u003e\n\u003c/div\u003e\n\n### Simulator\n\nMousefood can be run in a simulator using\n[embedded-graphics-simulator](https://crates.io/crates/embedded-graphics-simulator) crate.\n\n![Screenshot of a window running the simulator with a mousefood application](https://github.com/j-g00da/mousefood/blob/66d4010deed18f755cc3148a7f682f4119b7f664/assets/simulator.png?raw=true)\n\nRun simulator example:\n\n```shell\ngit clone https://github.com/j-g00da/mousefood.git\ncd mousefood/examples/simulator\ncargo run\n```\n\nFor more details, view the [simulator example](examples/simulator).\n\n### EPD support\n\n\u003cdiv align=\"center\"\u003e\n\n![WeAct epd demo](https://github.com/j-g00da/mousefood/blob/fa70cdd46567a51895caf10c44fff4104602e880/assets/epd-weact.jpg?raw=true)\n\n\u003c/div\u003e\n\nSupport for EPD (e-ink displays) produced by WeAct Studio\n(`weact-studio-epd` driver) can be enabled using `epd-weact` feature.\nThis driver requires some additional configuration:\n\n```rust\nuse mousefood::prelude::*;\nuse weact_studio_epd::graphics::Display290BlackWhite;\nuse weact_studio_epd::WeActStudio290BlackWhiteDriver;\n\n// Configure SPI\n// (...)\n\nlet mut driver = WeActStudio290BlackWhiteDriver::new(spi_interface, busy, rst, delay);\nlet mut display = Display290BlackWhite::new();\n\ndriver.init().unwrap();\n\nlet config = EmbeddedBackendConfig {\n    flush_callback: Box::new(move |d| { driver.full_update(d).unwrap(); }),\n    ..Default::default()\n};\nlet backend = EmbeddedBackend::new(\u0026mut display, config);\n```\n\nSupport for `epd_waveshare` driver is planned in the future.\n\n## Performance and hardware support\n\nFlash memory on most embedded devices is very limited. Additionally,\nto achieve high frame rate when using the `fonts` feature,\nit is recommended to use `opt-level = 3`,\nwhich can make the resulting binary even larger.\n\nMousefood is hardware-agnostic.\nSuccessfully tested on:\n\n- esp32 (base model, 4MB flash)\n- esp32c6 (16MB flash)\n\n## Docs\n\nFull API docs are available on [docs.rs](https://docs.rs/mousefood).\n\n## License\n\n[![License MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square\u0026color=8d97b3)](LICENSE-MIT)\n[![License Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square\u0026color=8d97b3)](LICENSE-APACHE)\n\nMousefood is dual-licensed under\n[Apache 2.0](LICENSE-APACHE) and [MIT](LICENSE-MIT) terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-g00da%2Fmousefood","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-g00da%2Fmousefood","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-g00da%2Fmousefood/lists"}