A basic drawing app in rust

Related tags

GUI nimato
Overview

eframe template

dependency status Build Status

This is a template repo for eframe, a framework for writing apps using egui.

The goal is for this to be the simplest way to get started writing a GUI app in Rust.

You can compile your app natively or for the web, and share it using Github Pages.

Getting started

Start by clicking "Use this template" at https://github.com/emilk/eframe_template/ or follow these instructions.

src/app.rs contains a simple example app. This is just to give some inspiration - most of it can be removed if you like.

Make sure you are using the latest version of stable rust by running rustup update

Testing locally

cargo run --release

On Linux you need to first run:

sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev

On Fedora Rawhide you need to run:

dnf install clang clang-devel clang-tools-extra speech-dispatcher-devel libxkbcommon-devel pkg-config openssl-devel

Compiling for the web

You can compile your app to WASM and publish it as a web page. For this you need to set up some tools. There are a few simple scripts that help you with this:

./setup_web.sh
./build_web.sh
./start_server.sh
open http://127.0.0.1:8080/
  • setup_web.sh installs the tools required to build for web
  • build_web.sh compiles your code to wasm and puts it in the docs/ folder (see below)
  • start_server.sh starts a local HTTP server so you can test before you publish
  • Open http://127.0.0.1:8080/ in a web browser to view

The finished web app is found in the docs/ folder (this is so that you can easily share it with GitHub Pages). It consists of three files:

  • index.html: A few lines of HTML, CSS and JS that loads your app. You need to edit this (once) to replace eframe_template with the name of your crate!
  • your_crate_bg.wasm: What the Rust code compiles to.
  • your_crate.js: Auto-generated binding between Rust and JS.

You can test the template app at https://emilk.github.io/eframe_template/.

Updating egui

As of 2021, egui is in active development with frequent releases with breaking changes. eframe_template will be updated in lock-step to always use the latest version of egui.

You might also like...
Rust bindings for the FLTK GUI library.
Rust bindings for the FLTK GUI library.

fltk-rs Rust bindings for the FLTK Graphical User Interface library. The FLTK crate is a crossplatform lightweight gui library which can be statically

Build beautiful desktop apps with flutter and rust. 🌠 (wip)
Build beautiful desktop apps with flutter and rust. 🌠 (wip)

flutter-rs Build flutter desktop app in dart & rust. Get Started Install requirements Rust flutter sdk Develop install the cargo flutter command cargo

Idiomatic, GTK+-based, GUI library, inspired by Elm, written in Rust
Idiomatic, GTK+-based, GUI library, inspired by Elm, written in Rust

Relm Asynchronous, GTK+-based, GUI library, inspired by Elm, written in Rust. This library is in beta stage: it has not been thoroughly tested and its

Rust bindings for Dear ImGui
Rust bindings for Dear ImGui

imgui-rs: Rust bindings for Dear ImGui (Recently under new maintenance, things subject to change) Window::new(im_str!("Hello world")) .size([300.0

Clear Coat is a Rust wrapper for the IUP GUI library.

Clear Coat Clear Coat is a Rust wrapper for the IUP GUI library. IUP uses native controls and has Windows and GTK backends. A macOS backend has been o

Rust binding for IUP

IUP Rust This library provides a high level wrapper around IUP, a multi-platform toolkit for building graphical user interfaces. See rust-iup-sys for

A simple UI framework for Rust built on top of IUP (http://webserver2.tecgraf.puc-rio.br/iup/)

KISS-UI A UI framework for Rust based on the KISS (Keep It Simple, Stupid!) philosophy. Powered by the IUP GUI library for C by Tecgraf, via the bindi

Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`
Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`

Improved User Interface A cross-platform UI toolkit for Rust based on libui iui: ui-sys: iui is a simple (about 4 kLOC of Rust), small (about 800kb, i

Integrate Qml and Rust by building the QMetaObject at compile time.

QMetaObject crate for Rust The qmetaobject crate is a crate which is used to expose rust object to Qt and QML. Objectives Rust procedural macro (custo

Owner
Nollie
sunlight is for chumps
Nollie
A small dice roller app with GUI written in Rust 🦀🎲

?? Mini Dice A small dice roller written in Rust and using the egui library. Demo ?? A short introduction... I started creating Mini Dice with the goa

Angelica Raborar 4 May 16, 2023
GUI app for managing Docker

dockeye GUI app for managing Docker Installation Prebuilt packages Download one of the archives available on the releases page and extract it somewher

Wojciech Kępka 397 Jan 3, 2023
A desktop application wrapper for CovidValidator.app

A desktop application wrapper for CovidValidator.app Check EU Digitial Covid Certificates with ease and validate them against local or country rules.

Timo Koenig 2 Mar 15, 2022
a day-planner/calendar app based on egui

Malakal Malakal is a day planner application. I crafted it because I was not able to find a comfortable calendar application for Linux. I myself have

null 5 Dec 21, 2022
A powerful desktop widget app for windows, built with Vue and Tauri.

DashboardX Widgets A powerful desktop widget app for windows, built with Vue and Tauri. Still in development Currently only runs on windows (uses nati

DashboardX Widgets 3 Oct 25, 2023
A simple, cross-platform GUI automation module for Rust.

AutoPilot AutoPilot is a Rust port of the Python C extension AutoPy, a simple, cross-platform GUI automation library for Python. For more information,

null 271 Dec 27, 2022
A data-first Rust-native UI design toolkit.

Druid A data-first Rust-native UI toolkit. Druid is an experimental Rust-native UI toolkit. Its main goal is to offer a polished user experience. Ther

null 8.2k Dec 31, 2022
The Rust UI-Toolkit.

The Orbital Widget Toolkit is a cross-platform (G)UI toolkit for building scalable user interfaces with the programming language Rust. It's based on t

Redox OS 3.7k Jan 1, 2023
An easy-to-use, 2D GUI library written entirely in Rust.

Conrod An easy-to-use, 2D GUI library written entirely in Rust. Guide What is Conrod? A Brief Summary Screenshots and Videos Feature Overview Availabl

PistonDevelopers 3.3k Jan 1, 2023
Rust bindings to Core Foundation and other low level libraries on Mac OS X and iOS

core-foundation-rs Compatibility Targets macOS 10.7 by default. To enable features added in macOS 10.8, set Cargo feature mac_os_10_8_features. To hav

Servo 685 Jan 2, 2023