Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: emilk/eframe_template
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: new-main-tag
Choose a base ref
...
head repository: emilk/eframe_template
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 1,625 additions and 804 deletions.
  1. +0 −6 .cargo/config.toml
  2. +10 −10 .github/workflows/pages.yml
  3. +32 −28 .github/workflows/rust.yml
  4. +19 −0 .github/workflows/typos.yml
  5. +13 −2 .gitignore
  6. +6 −0 .typos.toml
  7. +1,158 −724 Cargo.lock
  8. +11 −6 Cargo.toml
  9. +201 −0 LICENSE-APACHE
  10. +23 −0 LICENSE-MIT
  11. +5 −2 README.md
  12. +1 −0 Trunk.toml
  13. +3 −3 assets/manifest.json
  14. +13 −0 fill_template.ps1
  15. +27 −0 fill_template.sh
  16. +45 −0 flake.nix
  17. +20 −12 index.html
  18. +1 −1 rust-toolchain
  19. +2 −2 src/app.rs
  20. +35 −8 src/main.rs
6 changes: 0 additions & 6 deletions .cargo/config.toml

This file was deleted.

20 changes: 10 additions & 10 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Github Pages

# By default, runs if you push to master. keeps your deployed app in sync with master branch.
# By default, runs if you push to main. keeps your deployed app in sync with main branch.
on:
push:
branches:
- master
- main
# to only run when you do a new github release, comment out above part and uncomment the below trigger.
# on:
# release:
@@ -18,15 +18,15 @@ jobs:
build-github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # repo checkout
- uses: actions-rs/toolchain@v1 # get rust toolchain for wasm
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
override: true
- uses: actions/checkout@v4 # repo checkout
- name: Setup toolchain for wasm
run: |
rustup update stable
rustup default stable
rustup set profile minimal
rustup target add wasm32-unknown-unknown
- name: Rust Cache # cache the rust build artefacts
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
- name: Download and install Trunk binary
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
- name: Build # build
60 changes: 32 additions & 28 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -3,17 +3,15 @@ on: [push, pull_request, workflow_dispatch]
name: CI

env:
# This 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: --cfg=web_sys_unstable_apis
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
@@ -28,7 +26,7 @@ jobs:
name: Check wasm32
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
@@ -44,7 +42,7 @@ jobs:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
@@ -60,7 +58,7 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
@@ -76,7 +74,7 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
@@ -92,11 +90,11 @@ jobs:
name: trunk
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.72.0
toolchain: 1.81.0
target: wasm32-unknown-unknown
override: true
- name: Download and install Trunk binary
@@ -113,17 +111,14 @@ jobs:
- os: macos-latest
TARGET: aarch64-apple-darwin

- os: macos-latest
TARGET: x86_64-apple-darwin

- os: ubuntu-latest
TARGET: arm-unknown-linux-musleabihf
TARGET: aarch64-unknown-linux-gnu

- os: ubuntu-latest
TARGET: armv7-unknown-linux-musleabihf
TARGET: armv7-unknown-linux-gnueabihf

- os: ubuntu-latest
TARGET: x86_64-unknown-linux-musl
TARGET: x86_64-unknown-linux-gnu

- os: windows-latest
TARGET: x86_64-pc-windows-msvc
@@ -134,17 +129,26 @@ jobs:
run: echo "${{ matrix.TARGET }}"

- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1.0.1
with:
toolchain: stable
target: ${{ matrix.TARGET }}
override: true

- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --verbose --release --target=${{ matrix.TARGET }}
- name: Install build dependencies - Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --profile default --target ${{ matrix.TARGET }} -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# For linux, it's necessary to use cross from the git repository to avoid glibc problems
# Ref: https://github.com/cross-rs/cross/issues/1510
- name: Install cross for linux
if: contains(matrix.TARGET, 'linux')
run: |
cargo install cross --git https://github.com/cross-rs/cross --rev 1b8cf50d20180c1a394099e608141480f934b7f7
- name: Install cross for mac and windows
if: ${{ !contains(matrix.TARGET, 'linux') }}
run: |
cargo install cross
- name: Build
run: |
cross build --verbose --release --target=${{ matrix.TARGET }}
- name: Rename
run: cp target/${{ matrix.TARGET }}/release/eframe_template${{ matrix.EXTENSION }} eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
19 changes: 19 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copied from https://github.com/rerun-io/rerun_template

# https://github.com/crate-ci/typos
# Add exceptions to `.typos.toml`
# install and run locally: cargo install typos-cli && typos

name: Spell Check
on: [pull_request]

jobs:
run:
name: Spell Check
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4

- name: Check spelling of entire workspace
uses: crate-ci/typos@master
15 changes: 13 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
/target
/dist
# Mac stuff:
.DS_Store

# trunk output folder
dist

# Rust compile target directories:
target
target_ra
target_wasm

# https://github.com/lycheeverse/lychee
.lycheecache
6 changes: 6 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://github.com/crate-ci/typos
# install: cargo install typos-cli
# run: typos

[default.extend-words]
egui = "egui" # Example for how to ignore a false positive
Loading