| Crates.io | ustyle |
| lib.rs | ustyle |
| version | 0.1.1 |
| created_at | 2025-12-14 13:42:17.136523+00 |
| updated_at | 2025-12-15 17:45:14.621804+00 |
| description | A text-styling library for Rust `no_std` embedded targets. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1984500 |
| size | 28,863 |
A text-styling library for Rust no_std embedded targets.
After I tried creating a no_std embedded ANSI library, I noticed serious flaws in the ANSI format and decided to
create my own format:
μStyle (pronounced "Micro Style") is a ASCII-compatible text-styling format and library to style text with colors and attributes. The format is similar to ANSI, but uses way less bytes and is more compact.
It allows for fully heap-less styling of text without much stack-overhead.
ANSI and μStyle are both ASCII-compatible text-styling formats.
While ANSI uses tags to style text, μStyle uses a fixed descriptor format which only adds 5 bytes of overhead while an ANSI tag can add up to 19 bytes of overhead.
Keep in mind that you need multiple ANSI tags for fully styled strings.
| Feature | μStyle | ANSI |
|---|---|---|
| Byte overhead | always 5 bytes | up to 19 bytes per tag (possibility of multiple tags, so basically unlimited overhead possible) |
| Colors | only 35 colors (plus None color) |
built-in, index or RGB (basically all the colors) |
| Attributes | bitflag-based and constant sized | many with separate codes, adding extra style size |
μStyle does have some limitations:
None color) are supported.