← Todos los crates de Fission

fission

Production-focused Rust application framework for macOS, Windows, Linux, Web, Android, iOS, Terminal, Static site, and SSR targets
0.16.0 · android · ios · linux · macos · windows · web · terminal · static-site · ssr
Ver paquetes publicados en crates.io
Repositorio del código

Fission

Fission is a production-focused Rust application framework for building GPU-accelerated apps across macOS, Windows, Linux, Web, Android, iOS, Terminal, Static site, and SSR targets.
This crate is the public facade. Application code should normally depend on fission and enable the target or feature it needs from here instead of depending on the internal crates directly.
Documentation: fission.rsRepository: github.com/fission-ui/fission

Install

[dependencies]
fission = { version = "0.16.0", features = ["desktop"] }

For the full developer workflow, install the Fission command:
cargo install cargo-fission
fission init my-app
cd my-app
fission run

Using Fission from Git

For native desktop and mobile builds, Fission's shell and its built-in AccessKit adapter share the same pinned fission-winit dependency. Cargo does not need an application-level [patch.crates-io] entry when you consume Fission from Git.

What the facade gives you

Area
What is exposed
Application model
GlobalState, Widget, BuildCtxHandle, ViewHandle, typed actions, reducers, selectors, effects, jobs, services, and capabilities.
UI authoring
Core widgets, high-level widgets, icons, layout, portals, overlays, media/embed widgets, charts, 3D scenes, and design-system support.
Targets
macOS, Windows, Linux, Web, Android, iOS, Terminal, Static site, and SSR shells behind feature flags.
Platform integration
Notifications, deep links, NFC, biometrics, passkeys, barcode scanning, camera, clipboard, geolocation, haptics, microphone, Bluetooth, Wi-Fi, and volume control where the host supports them.
Tooling
The companion fission command handles setup, devices, run, test, package, static-site generation, release content, and distribution workflows.

Feature flags

Enable only what your app needs:
Feature
Purpose
desktop
Desktop shell for macOS, Windows, and Linux.
web
Browser/WASM shell.
android / ios / mobile
Mobile shell exports for Android and iOS targets.
site
Static site shell.
server
SSR shell.
terminal-shell
Terminal shell.
charts
Fission Charts widgets and data-visualization primitives.
three-d
3D scene and embed primitives.
test-driver
Live app testing client support.
Portable widgets and core APIs are available from the facade without making application developers wire internal crates together manually.

A small Fission app

use fission::prelude::*;

fission_component! {
    pub CounterApp<()> {
        state {
            count: i32 = 0,
        }
    }
    view(counter, _state, cx) {
        let tokens = &cx.view.env().theme.tokens;
    } =>
    Container(
        Column(
            gap: tokens.spacing.l,
            children: [
                Text("Counter").size(tokens.typography.heading1_size),
                Text(counter.count.to_string())
                    .size(tokens.typography.display_md_size),
                Button(
                    child: Text("Increment"),
                    key: "increment",
                    on_press: reduce { counter.count += 1; },
                ),
            ],
        ),
    )
    .padding_all(tokens.spacing.xl)
}

fn main() -> anyhow::Result<()> {
    DesktopApp::<(), _>::new(CounterApp).run()
}

Compose is the recommended authoring surface. It resolves every widget through ordinary Rust imports, uses direct public struct fields with Default for omitted values and lowers to Fission's existing widget, action and effect contracts. Use a small inline handler for component-specific transitions; use #[fission_reducer] or #[fission_action] when the action is shared, independently tested or part of your application API. Handwritten From<YourWidget> for Widget implementations remain the lower-level escape hatch for custom rendering and infrastructure.

Lifecycle workflow

The facade gives application code one dependency. The fission command gives developers one workflow:
fission init my-app
fission add-target web android ios
fission devices
fission run --target web
fission test --target web
fission site build --project-dir documentation --release
fission package --project-dir . --target windows --format msix --release
fission distribute --project-dir . --provider github-releases --artifact target/fission/release/windows/msix/artifact-manifest.json

Documentation

Start at fission.rs:

License

Fission is available under the Apache 2.0 license.