This commit is contained in:
Piotr Siuszko 2025-10-13 10:22:42 +02:00
parent f45c635865
commit 7889beeb0f
3 changed files with 30 additions and 22 deletions

View File

@ -13,6 +13,13 @@ on:
# types: # types:
# - published # - published
env:
# --cfg=web_sys_unstable_apis is required to enable the web_sys clipboard API which egui_web uses
# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html
# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html
RUSTFLAGS: -D warnings --cfg=web_sys_unstable_apis
RUSTDOCFLAGS: -D warnings
permissions: permissions:
contents: write # for committing to gh-pages branch. contents: write # for committing to gh-pages branch.

View File

@ -26,24 +26,24 @@ jobs:
command: fmt command: fmt
args: --all -- --check args: --all -- --check
trunk: # trunk:
name: trunk # name: trunk
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 # - uses: actions-rs/toolchain@v1
with: # with:
profile: minimal # profile: minimal
toolchain: stable # toolchain: stable
target: wasm32-unknown-unknown # target: wasm32-unknown-unknown
override: true # override: true
- name: Download and install Trunk binary # - name: Download and install Trunk binary
working-directory: crates/rpack_egui # working-directory: crates/rpack_egui
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- # run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
- name: Build # - name: Build
working-directory: crates/rpack_egui # working-directory: crates/rpack_egui
run: ./trunk build # run: ./trunk build
- uses: actions-rs/cargo@v1 # - uses: actions-rs/cargo@v1
with: # with:
command: check # command: check
args: --all-features --lib --target wasm32-unknown-unknown # args: --all-features --lib --target wasm32-unknown-unknown

View File

@ -11,12 +11,13 @@ license = "MIT OR Apache-2.0"
[features] [features]
default = [] default = []
profiler = ["dep:puffin", "dep:puffin_http", "dep:profiling"] profiler = ["dep:puffin", "dep:puffin_http", "dep:profiling"]
accesskit = ["eframe/accesskit"]
[dependencies] [dependencies]
egui = "0.32" egui = "0.32"
eframe = { version = "0.32", default-features = false, features = [ eframe = { version = "0.32", default-features = false, features = [
"persistence", "persistence",
"accesskit", # Make egui comptaible with screen readers. NOTE: adds a lot of dependencies. # "accesskit", # Make egui comptaible with screen readers. NOTE: adds a lot of dependencies.
"default_fonts", # Embed the default egui fonts. "default_fonts", # Embed the default egui fonts.
"glow", # Use the glow rendering backend. Alternative: "wgpu". "glow", # Use the glow rendering backend. Alternative: "wgpu".
] } ] }