Crates.io | acrylic-wayland |
lib.rs | acrylic-wayland |
version | 0.3.5 |
source | src |
created_at | 2022-05-19 10:23:28.674916 |
updated_at | 2023-09-07 09:59:01.615093 |
description | compile acrylic apps for wayland environments |
homepage | |
repository | https://github.com/NathanRoyer/acrylic |
max_upload_size | |
id | 589637 |
size | 18,658 |
Ultra-portable, web-inspired UI toolkit with SIMD graphics.
Work in progress!
Also, requires a nightly toolchain if you've enabled SIMD support (which is the default).
no_std
no_std
supportplatform | Link | Rendering | Asset Loading | Event Handling |
---|---|---|---|---|
web | acrylic-web | ☑ | ☑ | WiP |
wayland | acrylic-wayland | ☑ | ☑ | WiP |
x11 | ||||
gdi | ||||
fbdev | ||||
drmkms |
.
├── Cargo.toml
├── assets
│ ├── rustacean-flat-happy.png
│ └── default.xml
└── src
└── app.rs
You can get it here.
Place it in assets/
.
<h-rem style="default">
<inflate />
<v-fixed length="400" gap="10">
<inflate />
<png file="rustacean-flat-happy.png" />
<h-fixed length="40" gap="10">
<inflate />
<label text="Rust rocks!" />
<inflate />
</h-fixed>
<inflate />
</v-fixed>
<inflate />
</h-rem>
use platform::{app, acrylic::{core::app::SimpleCallbackMap, ArcStr}};
fn layout_selector() -> ArcStr {
"default.xml".into()
}
app!("./assets/", layout_selector, SimpleCallbackMap::new(), "default.json");
[package]
name = "my-app"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = [ "cdylib" ]
path = "src/app.rs"
[dependencies]
# building for the web
platform = { package = "acrylic-web", version = "0.3" }
cargo +nightly build --release --target wasm32-unknown-unknown
Note: this uses nightly because SIMD in rust is currently unstable.
httpserv
is tiny and good enough for this demo.
cargo install httpserv
You can get it here. Place it at the root of your project, next to the cargo manifest.
From the root of your project:
# normal start:
httpserv
# quiet + in the background
httpserv > /dev/null &
Then open http://localhost:8080/#release
You can contact me via email
or on Discord: bitsneak#1889
.
You can use these for any question regarding this project.
We gladly accept all contributions via Github Pull Requests.