Installation

Blinc requires Rust 1.89 or newer and a GPU supported by Vulkan, Metal or DirectX 12. Browser applications use WebAssembly and WebGPU.

Add Blinc

[dependencies]
blinc = { version = "0.6", features = ["cn"] }

The blinc package exposes the framework through blinc::app, blinc::layout, blinc::core, blinc::theme and the other API modules. blinc::prelude::* imports the common builders, core types and reactive functions. The cn feature adds the component library.

Verify the installation

Create src/main.rs:

use blinc::{app::windowed::WindowedApp, cn, prelude::*};

fn main() -> Result<()> {
    let theme = cn::cn_bundle().with_css(r#"
        .welcome {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--background);
        }
    "#);

    WindowedApp::run_with_theme(
        WindowConfig::default(), theme, ColorScheme::Dark,
        |_ctx| div().class("welcome").child(cn::h1("Your workspace")),
    )
}

Run cargo run. A window opens using Blinc's built-in theme and the application's stylesheet. Continue with Your First App to add Signals, Computeds and interactive components.

Feature flags

Desktop windowing is enabled by default. Other platforms disable defaults and select their runner:

# Browser application
blinc = { version = "0.6", default-features = false, features = ["web", "cn"] }

# Android application
blinc = { version = "0.6", default-features = false, features = ["android", "cn"] }

# iOS application
blinc = { version = "0.6", default-features = false, features = ["ios", "cn"] }
FeatureAPI
windowedDesktop runner; enabled by default
webBrowser runner and blinc::platform_web helpers
android, iosMobile runners
cnComponents through blinc::cn
svgSVG loading and rasterization through blinc::svg
iconsLucide icon data and SVG helpers through blinc::icons
mediablinc::media and the layout playback widgets
dialogs, tray, notifications, hotkeysDesktop system integrations
windowed-fullDesktop runner and all four system integrations
clipboard-imageImage clipboard support
svg-raster-imagesSVG module with embedded raster decoding
icons-registryIcons module with name-based lookup
theme-watcherSystem colour-scheme watcher
hot-reloadApplication hot reload

For headless rendering, use default-features = false without a runner feature. Add icons, svg or media when using the corresponding examples in this book. Module flags expose the public API; the application renderer also uses SVG internally, and components depend on icon data.

Platform setup

macOS uses Metal. Windows uses DirectX 12 or Vulkan with supported GPU drivers. Linux needs its graphics and window-system development libraries; for a Vulkan setup:

# Ubuntu / Debian
sudo apt install libvulkan-dev

# Fedora
sudo dnf install vulkan-devel

# Arch
sudo pacman -S vulkan-icd-loader

Platform-specific setup is covered in the Web, Android and iOS guides.