Crates.io | panoramix |
lib.rs | panoramix |
version | 0.0.3 |
source | src |
created_at | 2021-03-04 18:44:20.950604 |
updated_at | 2021-03-25 14:05:03.669476 |
description | A prototype implementation of reactive UI in rust |
homepage | |
repository | https://github.com/PoignardAzur/panoramix |
max_upload_size | |
id | 363835 |
size | 274,690 |
Panoramix is an experimental GUI framework for the Rust programming language.
The framework is data-driven and declarative, drawing some inspiration from React, and implemented on top of the Druid toolkit (hence the name).
It aims to use simple, idiomatic Rust: Panoramix doesn't use unsafe code, cells, mutexes, or DSL macros.
Here is our "hello world" example:
use panoramix::elements::{Button, Label};
use panoramix::{component, Column, CompCtx, Element, NoEvent, RootHandler};
#[component]
fn HelloBox(_ctx: &CompCtx, _props: ()) -> impl Element {
Column!(
Label::new("Hello world!"),
Button::new("Say hello").on_click(|_, _| {
println!("Hello world");
})
)
}
fn main() -> Result<(), panoramix::PlatformError> {
RootHandler::new(HelloBox::new(()))
.with_tracing(true)
.launch()
}
See the documentation for details, and the Writing a new component tutorial.
Issues and PRs are welcome.
PRs that add "basic block" widgets in particular will be appreciated.
See CONTRIBUTING.md for the rules to follow when making a PR. Issues don't have a mandatory format, but if you submit one, please follow common-sense rules: be polite, be professional, have a plan to kill everyone you meet, and if you have a problem, please include detailed steps to reproduce.
See ARCHITECTURE.md for a high-level presentation of the project code.
To ask questions and discuss development work, go to Druid's Zulip chat, in the #panoramix
channel.
In your Cargo.toml
, add the following:
panoramix = "0.1.0"
If you want the bleeding-edge version, add the following instead:
panoramix = { git = "https://github.com/PoignardAzur/panoramix.git" }
Note for Linux users: Panoramix is built on top of Druid, using the GTK backend, which requires a dev version of GTK3. See GTK installation page for install info.
Eg on Ubuntu-based distributions, you should run sudo apt install libgtk-3-dev
.
The short term roadmap is:
On the longer timescale, there are two broad goals:
See ROADMAP.md for details.
This crate has been almost entirely written by Olivier FAURE. Any other contributor will be added to AUTHORS.md.
This project has been possible thanks to the extremely clean and approchable work of Raph Levien and Colin Rofls, as well as some mentoring on their part, and general interaction with the Druid community. In particular, Panoramix is inspired from Crochet.