Skip to content

Crates ​

Smudge is a workspace of small crates with one job each. Most applications depend on `smudge` alone, which re-exports the rest.

CrateWhat it holdsAPI
smudgeThe facade: re-exports, the prelude, and the examples.docs.rs
smudge-coreThe widget tree, reactive signals, style, layout, paint, damage tracking and the headless App. No window, GPU or rasterizer dependency.docs.rs
smudge-textFonts, text layout, the label, the text input and the text area.docs.rs
smudge-widgetsContainers, the button, the image, the scroll view and the virtual lists.docs.rs
smudge-cpuThe CPU renderer, which repaints only damaged regions.docs.rs
smudge-gpuThe GPU renderer.docs.rs
smudge-platformWindows, input, presentation, renderer choice, and the web build.docs.rs
smudge-a11yThe bridge from the widget tree's semantics to the platform accessibility APIs.docs.rs

The repository also holds three crates that are not published: smudge-bench, the benchmark tool, smudge-test, shared test helpers, and docs-check, which compiles the guide's samples.

How they fit ​

text
                            smudge  (facade)
                 ┌────────────────┴─────────────────┐
          smudge-widgets                    smudge-platform
                 │                     ┌──────────┼───────────┐
            smudge-text           smudge-cpu  smudge-gpu  smudge-a11y
                 │                     │     (gpu feature)    │
                 └───────────────► smudge-core ◄──────────────┘

The diagram shows the main paths; most crates also depend on smudge-core directly. smudge-core sits at the bottom and knows nothing about windows or pixels. It produces a display list and a set of damaged rectangles per frame. A renderer turns those into pixels, and the platform crate puts the pixels on screen.

Through the facade ​

PathIs
smudge::prelude::*The types and functions an application names most often.
smudge::coresmudge-core
smudge::textsmudge-text
smudge::widgetssmudge-widgets
smudge::commandsThe window commands, the window state and the cursors, which is smudge::core::window under a name apart from smudge::window
smudge::windowsmudge-platform, with the window feature (on by default)
smudge::gpusmudge-gpu, with the gpu feature

smudge-cpu is not re-exported. Depend on it directly to render frames yourself, for example in headless tests.

Versions ​

The published crates share one version and are released together. Smudge supports Rust 1.89 and newer.

Released under the MIT or Apache 2.0 license, at your option.