rust_widgets 0.0.2

Pure Rust cross-platform native GUI architecture
docs.rs failed to build rust_widgets-0.0.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: rust_widgets-0.5.19

rust_widgets

Pure Rust cross-platform native GUI architecture.

Quick Start

cargo check
cargo check --examples
cargo run --example demo_main

Runtime Profiles

  • default + full: complete desktop-oriented stack.
  • embedded: minimal runtime for embedded targets (excludes xml, i18n, theme, and bindings modules at compile time).
  • mobile-api: reserved unified extension points for mobile targets.

Feature Toggle Examples

# Full profile (default)
cargo check

# Embedded-lite profile
cargo check --no-default-features --features embedded

# Full profile + mobile API reservation
cargo check --features "full,mobile-api"

# Embedded profile + mobile API reservation
cargo check --no-default-features --features "embedded,mobile-api"

v2 Runtime and Validation Workflow

  • Lifecycle routing is now profile-explicit:
    • desktop (not embedded) routes init/run/quit directly to native platform backends
    • embedded routes lifecycle through RenderEngine
  • Runtime route diagnostics can be enabled with:
RUST_WIDGETS_TRACE_RUNTIME=1 cargo run --example demo_main
  • Unified validation scripts:
# default + examples + embedded profile matrix
tools/check_profiles.sh

# ABI consistency gate (version + symbols + generated header drift)
tools/check_abi.sh

v3 Release Workflow

# demo smoke (default + embedded)
tools/smoke_demos.sh

# package validation without upload
cargo publish --dry-run

Platform Scope

  • Desktop: Windows (Win32), macOS (Cocoa), Linux (GTK), Harmony Desktop.
  • Embedded: embedded Linux / embedded Harmony (lite profile path).
  • Mobile: Android / iOS / Harmony mobile reserved API (architecture-ready, implementation to be expanded later).

Core Modules

  • core, object, event, signal, widget, layout, xml, i18n
  • platform, theme, style, bindings
  • print, pdf, chart (feature-gated)

Documentation Index

Demo Highlights

  • Main and architecture demos: demo_main, demo_layout, demo_xml, demo_i18n
  • UI control demos: window/dialog/popup, input controls, data-view controls, containers, menu/tool/status controls, table/grid/chart/canvas

For the complete categorized list and command set, open demos/README.md.

C ABI Samples

Build and run (from project root):

# 1) Build dynamic library
cargo build

# 2) Compile C sample (macOS)
clang -Iexamples examples/c_abi_poll_demo.c -Ltarget/debug -lrust_widgets -o target/debug/c_abi_poll_demo

# 3) Run (macOS)
DYLD_LIBRARY_PATH=target/debug ./target/debug/c_abi_poll_demo

Linux:

LD_LIBRARY_PATH=target/debug ./target/debug/c_abi_poll_demo

Windows (MSYS2/MinGW style): use set PATH=target\\debug;%PATH% before running the executable.