Go to file
Samuel Guerra f6a1331211 Setup some manual tests. 2021-10-21 12:25:10 -03:00
.vscode Fixed gradients not showing, some gradients still not rendering corretly. 2021-09-17 15:36:28 -03:00
TODO Changed windows to be transparent by default. 2021-10-20 14:18:07 -03:00
dependencies Updated webrender to sub-module dependency, fixed breaking changes. 2021-09-14 22:35:24 -03:00
examples Setup some manual tests. 2021-10-21 12:25:10 -03:00
test-crates Fixed split-app release build. 2021-10-03 23:52:33 -03:00
tests Fixed build tests. 2021-10-20 14:33:31 -03:00
tools Added support for --timing on `do build -e` 2021-09-29 00:16:37 -03:00
zero-ui Fixed access violation in WrImageCache. 2021-10-21 00:41:31 -03:00
zero-ui-core Implemented per-image limits. 2021-10-20 20:41:20 -03:00
zero-ui-proc-macros Actually fixed widgets![] release build. 2021-10-14 18:54:09 -03:00
zero-ui-view Fixed access violation in WrImageCache. 2021-10-21 00:41:31 -03:00
zero-ui-view-api Changed windows to be transparent by default. 2021-10-20 14:18:07 -03:00
.gitattributes More EOF fixes. 2021-09-06 15:22:40 -03:00
.gitignore Setup some manual tests. 2021-10-21 12:25:10 -03:00
.gitmodules Updated webrender to sub-module dependency, fixed breaking changes. 2021-09-14 22:35:24 -03:00
CHANGELOG.md * Added LICENSE and CHANGELOG. 2021-07-29 18:46:39 -03:00
Cargo.toml Changed dependencies to use the new view API. 2021-09-28 14:52:56 -03:00
LICENSE * Added LICENSE and CHANGELOG. 2021-07-29 18:46:39 -03:00
README.md Implemented test for crate version in usage example. 2021-07-29 23:02:23 -03:00
do Drop files from .gitignore 2021-05-20 12:39:34 -03:00
do.bat Added 'do' support for unix systems. 2021-03-02 22:34:51 -03:00
do.ps1 Added Powershell do. 2021-03-03 14:18:29 -03:00
rustfmt.toml Updated webrender to sub-module dependency, fixed breaking changes. 2021-09-14 22:35:24 -03:00

README.md

License Crates.io docs.rs

zero-ui

Zero-Ui is the pure Rust GUI framework with batteries included.

It provides all that you need to create a beautiful, fast and responsive multi-platform GUI apps, it includes many features that allow you to get started quickly, without sacrificing customization or performance. With features like gesture events, common widgets, layouts, data binding, async tasks, accessibility and localization you can focus on what makes your app unique, not the boilerplate required to get modern apps up to standard.

When you do need to customize, Zero-Ui is rightly flexible, you can create new widgets or customize existing ones, not just new looks but new behavior, at a lower level you can introduce new event types or new event sources, making custom hardware seamless integrate into the framework.

Usage

First add this to your Cargo.toml:

[dependencies]
zero-ui = "0.1"

Then create your first window:

use zero_ui::prelude::*;

fn run() {
    App::default().run_window(|_| {
        let size = var_from((800, 600));
        window! {
            title = size.map(|s: &Size| formatx!("Button Example - {}", s));
            size;
            content = button! {
                on_click = hn!(|_,_| {
                    println!("Button clicked!");
                });
                margin = 10;
                size = (300, 200);
                align = Alignment::CENTER;
                font_size = 28;
                content = text("Click Me!");
            }
        }
    })
}

See the API docs front page for more details.

Dependencies

Extra system dependencies needed for building a crate that uses the zero-ui crate.

Windows

You just need the latest stable Rust toolchain installed.

Linux

  • Latest stable Rust.
  • build-essential or equivalent C/C++ compiler package.
  • cmake
  • pkg-config
  • libfreetype6-dev
  • libfontconfig1-dev

Linux support is tested using the Windows Subsystem for Linux (Ubuntu image).

Other Dependencies

For debugging this project you may also need cargo-expand and the nightly toolchain for debugging macros (do expand), cargo-asm for checking optimization (do asm).

You also need the nightly toolchain for building the documentation (do doc), although you can build the documentation in stable using cargo doc, but custom pages like widget items may not render properly because of changes in the cargo-doc HTML templates.

do

There is a built-in task runner for managing this project, run do help or ./do help for details.

The task runner is implemented as a Rust crate in tools/do-tasks, the shell script builds it in the first run.