Skip to main content

Crate fission

Crate fission 

Source
Expand description

§Fission

A cross-platform, GPU-accelerated UI framework for Rust.

This crate re-exports all Fission sub-crates so applications only need a single dependency:

[dependencies]
fission = { path = "..." }

Then use via:

use fission::prelude::*;           // Common widget + action types
use fission::core::*;              // Low-level runtime/action APIs
use fission::widgets::*;           // Authoring widgets (Modal, Popover, etc.)
use fission::ir::*;                // Intermediate representation
use fission::theme::*;             // Theming
use fission::icons::material::*;   // Material icons
use fission::shell::DesktopApp;    // Desktop shell
use fission::macros::Action;       // Derive macros
use fission::text_engine::*;       // Rope-backed text buffer

Modules§

core
Core runtime, widgets, actions, reducers, effects.
diagnostics
Diagnostics system — structured logging, performance tracing.
i18n
Internationalisation — locale registry, string lookups.
icons
Material Design icons.
ir
Intermediate representation (IR) — the node graph between widgets and layout.
layout
Layout engine — constraint-based layout with Box, Flex, Grid, Scroll, etc.
macros
Derive macros — #[derive(Action)] and friends.
node
The serialisable widget-tree node enum.
op
Operations that IR nodes can perform.
prelude
Prelude for UI authoring — import this for the most common types.
render
Rendering primitives — DisplayList, DisplayOp, TextStyle, Color.
shell
Desktop shell — winit + Vello + wgpu.
test_driver
Test driver — LiveTestClient, TestCommand, TestResponse.
theme
Theming — design tokens, component themes, dark/light mode.
traits
Lowering traits for converting widgets into the intermediate representation.
widgets
Authoring widgets — Modal, Popover, Tooltip, Menu, Combobox, SplitView, etc.

Structs§

ActionEnvelope
A type-erased action envelope that can be stored in widget trees and dispatched through the Runtime.
ActionId
A stable, globally unique identifier for an Action type.
Align
Centers its child within the available parent space.
BuildCtx
The mutable context passed to Widget::build.
Builder
A closure-based widget that builds a Node tree from a function.
Button
A pressable button widget with built-in theming, hover/press states, and focus ring.
Checkbox
A boolean toggle with a square check indicator and optional label.
Column
A vertical flex container that lays out children in a column.
Container
The universal wrapper widget: background colour, border, padding, size constraints, and box shadow on a single child.
CustomNode
An application-defined node with custom lowering logic.
DesktopApp
The desktop application shell that owns the window, event loop, and rendering pipeline.
Env
FocusScope
GestureDetector
Detects pointer gestures on its child and dispatches corresponding actions.
Grid
A CSS-grid-style layout container.
GridItem
A child placed within a Grid at a specific row/column position.
HStack
A horizontal stack that arranges children in a row with optional spacing.
Icon
A vector icon rendered from an SVG path, file, or inline SVG content.
Image
A raster image widget.
LayoutBuilder
A closure-based widget that receives its parent’s BoxConstraints.
LayoutPoint
A 2D point in layout coordinate space.
LayoutRect
An axis-aligned rectangle: an origin point plus a size.
LayoutSize
A 2D size in layout coordinate space.
LazyColumn
A virtualized vertical list that only builds visible items.
NodeId
A content-addressed 128-bit node identity.
Overlay
A widget that renders an overlay layer on top of its content.
Positioned
Absolutely positions a child within a ZStack.
Radio
A single-select radio button with a circular indicator and optional label.
Row
A horizontal flex container that lays out children in a row.
SafeArea
Scroll
A scrollable container that clips its child and tracks scroll offset.
Slider
A continuous value selector rendered as a horizontal track with a draggable thumb.
Spacer
An invisible widget that occupies space.
Switch
A boolean toggle rendered as a sliding thumb on a track.
Text
A read-only text label.
TextInput
An editable text field with support for single-line and multiline input, syntax highlighting, password masking, and IME composition.
VStack
A vertical stack that arranges children in a column with optional spacing.
Video
A platform-native video player widget.
View
Read-only access to application state and environment during widget building.
WidgetNodeId
A 128-bit identity for a widget.
ZStack
A z-axis stacking container that layers children on top of each other.

Enums§

ButtonContentAlign
Horizontal alignment of a Button’s child content.
ButtonVariant
Visual style variant for a Button.
InputEvent
The top-level input event type consumed by Runtime::handle_input.
KeyCode
Platform-independent key code for keyboard events.
KeyEvent
A keyboard key press or release event.
Node
A serialisable node in the declarative widget tree.
PointerButton
Identifies which mouse button or touch produced a pointer event.
PointerEvent
A pointer (mouse / touch / stylus) event in layout coordinates.
PortalLayer
Z-order layer for portal entries.
TextContent
The content source for a Text widget.

Traits§

Action
A strongly-typed, serialisable event payload.
AppState
Trait for application state managed by the Runtime.
Lower
Converts a widget struct into fission-ir nodes.
LowerDyn
Object-safe variant of Lower for use inside CustomNode.
Widget
The core trait for composable UI components.

Type Aliases§

Handler
The canonical 3-argument handler signature for modern reducers.
LayoutUnit
The scalar type used for all layout measurements.

Derive Macros§

ActionDerive
Derives the Action trait for a struct.