Expand description
The Martensite GUI Framework.
Martensite is a retained-mode, GPU-accelerated graphical user interface framework for Rust. It provides deterministic generational arena storage, fine-grained reactive signals, and a GPU rendering pipeline built on WGPU and Vello.
§Getting started
Add martensite to your Cargo.toml:
[dependencies]
martensite = "0.22.0"§Examples
Import the prelude for the most commonly used types:
use martensite::prelude::*;§Architecture
Each subsystem lives in its own crate, re-exported here for convenience:
core— generational widget arena,WidgetId,HotNode,ColdNodereactive— push-pull signal DAG with cycle detectionlayout— Taffy-based flexbox and grid layoutwgpu— WGPU device and surface managementrender— Vello GPU rendering pipelinetext— HarfBuzz shaping, BiDi, and font fallbackaccess— AccessKit native accessibility integrationwindow— Winit multi-window managementfocus— Focus traversal and managementclipboard— Clipboard integrationdnd— Drag and droptheme— Oklab color theme systemmotion— Spring physics animationhistory— Undo/redo historyl10n— Localization via Fluentmacros— Procedural macrosblessed— Curated tier-1 widgets (DataTable,DockTree,Chart,CodeEditor)shell— System backdrops, snap layouts, CSD, and system traydevtools— Tracing spans, GPU timestamps, and the in-app diagnostic HUDdesign_lint— Standards-backed design linting over paint scope geometryapp— Application builder and software fallback configuration- Testing utilities are available via the
martensite-testdev-dependency.
Re-exports§
pub use martensite_access as access;pub use martensite_blessed as blessed;pub use martensite_clipboard as clipboard;pub use martensite_core as core;pub use martensite_design_lint as design_lint;pub use martensite_devtools as devtools;pub use martensite_dnd as dnd;pub use martensite_focus as focus;pub use martensite_history as history;pub use martensite_l10n as l10n;pub use martensite_layout as layout;pub use martensite_macros as macros;pub use martensite_media as media;pub use martensite_motion as motion;pub use martensite_reactive as reactive;pub use martensite_render as render;pub use martensite_sanitize as sanitize;pub use martensite_shell as shell;pub use martensite_text as text;pub use martensite_theme as theme;pub use martensite_wgpu as wgpu;pub use martensite_window as window;
Modules§
- app
- Application builder and runtime configuration.
- icons
- Native stroke-icon vocabulary: the
BUILTINicon pack, theIconPack/IconSetresolution chain, and the name constants — external packs plug in as overlays over the builtin fallback. - prelude
- Convenience prelude re-exporting the most commonly used Martensite types.
- runner
- Canonical windowed runner: winit
ApplicationHandler+ GPU - text_
paint - Foundational widgets (
Button,CheckBox,Container,Flex,MediaView,Stack,Text,TextInput). - widgets
- Base widgets:
Container,Flex,Stack,Text.