From 05400828b6987db7457ed8d5ae90d75a7325aebb Mon Sep 17 00:00:00 2001 From: Vera Gonzalez Date: Fri, 10 Apr 2026 06:09:38 -0400 Subject: [PATCH 1/3] remove sccache --- .github/workflows/rust.yml | 44 ++++---------------------------------- 1 file changed, 4 insertions(+), 40 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0ad92cf3..5a04c857 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,12 +11,10 @@ on: default: 0.20.0 cargo_audit_ignores: type: string - default: '' + default: "" description: Comma-delimited list of RUSTSEC CVE identifiers to ignore during audit. env: - RUSTC_WRAPPER: sccache - SCCACHE_GHA_ENABLED: true CARGO_TERM_COLOR: always jobs: @@ -28,7 +26,6 @@ jobs: with: key: ${{ runner.os }}-${{ github.workflow }}-${{ inputs.cache_version }}-rust-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}-${{ github.sha }} path: | - ~/.cache/sccache ~/.cargo/bin/ ~/.cargo/registry/cache/ ~/.cargo/registry/index/ @@ -60,16 +57,10 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: targets: x86_64-unknown-linux-musl - # easily install any rust bins without building them - uses: cargo-bins/cargo-binstall@main - # install cargo-auditable to produce the binary - run: cargo binstall -y cargo-auditable - # install sccache (compilation cache) - - uses: mozilla-actions/sccache-action@v0.0.4 - # install mold (linker) - uses: rui314/setup-mold@v1 - run: ld --version - # build - run: mold -run cargo auditable build --target x86_64-unknown-linux-musl --all-targets --release --bins test: @@ -80,7 +71,6 @@ jobs: with: key: ${{ runner.os }}-${{ github.workflow }}-${{ inputs.cache_version }}-rust-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}-${{ github.sha }} path: | - ~/.cache/sccache ~/.cargo/bin/ ~/.cargo/registry/cache/ ~/.cargo/registry/index/ @@ -90,14 +80,9 @@ jobs: ${{ runner.os }}-${{ github.workflow }}-${{ inputs.cache_version }}-rust-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}- ${{ runner.os }}-${{ github.workflow }}-${{ inputs.cache_version }}-rust-${{ github.job }}- - uses: dtolnay/rust-toolchain@stable - # easily install any rust bins without building them - uses: cargo-bins/cargo-binstall@main - # install sccache (compilation cache) - - uses: mozilla-actions/sccache-action@v0.0.4 - # install mold (linker) - uses: rui314/setup-mold@v1 - run: ld --version - # test - run: mold -run cargo test --workspace format: @@ -108,7 +93,6 @@ jobs: with: key: ${{ runner.os }}-${{ github.workflow }}-${{ inputs.cache_version }}-rust-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}-${{ github.sha }} path: | - ~/.cache/sccache ~/.cargo/bin/ ~/.cargo/registry/cache/ ~/.cargo/registry/index/ @@ -120,28 +104,20 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: clippy, rustfmt - # also install nightly regardless - uses: dtolnay/rust-toolchain@stable with: toolchain: nightly components: clippy, rustfmt - # easily install any rust bins without building them - uses: cargo-bins/cargo-binstall@main - # install sccache (compilation cache) - - uses: mozilla-actions/sccache-action@v0.0.4 - # install mold (linker) - uses: rui314/setup-mold@v1 - run: ld --version - # cargo check - name: check run: mold -run cargo check --all-targets --all-features --tests - # cargo fmt - name: cargo fmt run: mold -run cargo +nightly fmt --all --check - # cargo clippy - name: cargo clippy run: mold -run cargo clippy --all-targets --all-features --tests -- -D warnings - + audit: runs-on: ubuntu-latest steps: @@ -150,7 +126,6 @@ jobs: with: key: ${{ runner.os }}-${{ github.workflow }}-${{ inputs.cache_version }}-rust-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}-${{ github.sha }} path: | - ~/.cache/sccache ~/.cargo/bin/ ~/.cargo/registry/cache/ ~/.cargo/registry/index/ @@ -160,13 +135,8 @@ jobs: ${{ runner.os }}-${{ github.workflow }}-${{ inputs.cache_version }}-rust-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}- ${{ runner.os }}-${{ github.workflow }}-${{ inputs.cache_version }}-rust-${{ github.job }}- - uses: dtolnay/rust-toolchain@stable - # easily install any rust bins without building them - uses: cargo-bins/cargo-binstall@main - # install cargo-auditable to produce the binary - - run: cargo binstall -y cargo-deny --locked - # install sccache (compilation cache) - - uses: mozilla-actions/sccache-action@v0.0.4 - # install mold (linker) + - run: cargo binstall -y cargo-deny --locked - uses: rui314/setup-mold@v1 - run: ld --version - name: bans licenses sources @@ -182,7 +152,6 @@ jobs: with: key: ${{ runner.os }}-${{ github.workflow }}-${{ inputs.cache_version }}-rust-${{ github.job }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}-${{ github.sha }} path: | - ~/.cache/sccache ~/.cargo/bin/ ~/.cargo/registry/cache/ ~/.cargo/registry/index/ @@ -194,13 +163,8 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: targets: wasm32-unknown-unknown - # easily install any rust bins without building them - uses: cargo-bins/cargo-binstall@main - # install cargo-auditable to produce the binary - - run: cargo binstall -y trunk - # install sccache (compilation cache) - - uses: mozilla-actions/sccache-action@v0.0.4 - # install mold (linker) + - run: cargo binstall -y trunk - uses: rui314/setup-mold@v1 - run: ld --version - name: trunk build From 55cbd23dda741f3713eeb4a477e504fd355e6f3c Mon Sep 17 00:00:00 2001 From: Vera Gonzalez Date: Fri, 10 Apr 2026 06:12:24 -0400 Subject: [PATCH 2/3] add agpl-3.0-or-later --- deny.toml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/deny.toml b/deny.toml index 04972301..4634b0a1 100644 --- a/deny.toml +++ b/deny.toml @@ -7,17 +7,18 @@ ignore = ["RUSTSEC-2024-0384"] [licenses] allow = [ - "AGPL-3.0", - "Apache-2.0", - "MIT", - "Zlib", - "BSL-1.0", - "MPL-2.0", - "ISC", - "CC0-1.0", - "BSD-3-Clause", - "BSD-2-Clause", - "Unicode-DFS-2016", + "AGPL-3.0", + "AGPL-3.0-or-later", + "Apache-2.0", + "MIT", + "Zlib", + "BSL-1.0", + "MPL-2.0", + "ISC", + "CC0-1.0", + "BSD-3-Clause", + "BSD-2-Clause", + "Unicode-DFS-2016", ] [bans] From e77e7a3e5c092348b30ec6492c4b8e39d0e873a2 Mon Sep 17 00:00:00 2001 From: Vera Gonzalez Date: Fri, 10 Apr 2026 07:01:06 -0400 Subject: [PATCH 3/3] address nits --- flake.nix | 1 + src/bones/face.rs | 2 +- src/main.rs | 2 ++ src/render/app.rs | 75 ++++++++++++++++++++---------------------- src/render/controls.rs | 2 +- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/flake.nix b/flake.nix index 9ca4c281..60b5258d 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,7 @@ cargo rust-analyzer rustfmt + clippy rustc lld graphviz diff --git a/src/bones/face.rs b/src/bones/face.rs index 6f956a5b..b774400e 100644 --- a/src/bones/face.rs +++ b/src/bones/face.rs @@ -52,7 +52,7 @@ impl Face { self.0.len() } - pub fn iter(&self) -> std::slice::Iter { + pub fn iter(&self) -> std::slice::Iter<'_, usize> { self.0.iter() } diff --git a/src/main.rs b/src/main.rs index cbb683f0..71fb5671 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + mod bones; mod render; use iced::futures::executor::block_on; diff --git a/src/render/app.rs b/src/render/app.rs index 3b550e39..ed102dd9 100644 --- a/src/render/app.rs +++ b/src/render/app.rs @@ -351,46 +351,43 @@ impl ApplicationHandler for App<'_> { WindowEvent::CloseRequested => { event_loop.exit(); } - WindowEvent::KeyboardInput { event, .. } => { - if event.state.is_pressed() { - let Some(key) = &event.text else { - return; - }; - - let message = if key.as_str() == key.to_uppercase().as_str() { - use PresetMessage::*; - match key.to_lowercase().as_str() { - // Presets - "t" => Some(Pyramid(3)), - "c" => Some(Prism(4)), - "o" => Some(Octahedron), - "d" => Some(Dodecahedron), - "i" => Some(Icosahedron), - _ => None, - } - .map(PolybladeMessage::Preset) - } else { - use ConwayMessage::*; - match key.as_str() { - // Operations - "e" => Some(Expand), - "d" => Some(Dual), - "s" => Some(Snub), - "k" => Some(Kis), - "j" => Some(Join), - "a" => Some(Ambo), - "t" => Some(Truncate), - "b" => Some(Bevel), - _ => None, - } - .map(PolybladeMessage::Conway) - }; - - if let (Some(message), Some(AppData { state, .. })) = - (message, &mut self.data) - { - state.queue_message(message); + WindowEvent::KeyboardInput { event, .. } if event.state.is_pressed() => { + let Some(key) = &event.text else { + return; + }; + + let message = if key.as_str() == key.to_uppercase().as_str() { + use PresetMessage::*; + match key.to_lowercase().as_str() { + // Presets + "t" => Some(Pyramid(3)), + "c" => Some(Prism(4)), + "o" => Some(Octahedron), + "d" => Some(Dodecahedron), + "i" => Some(Icosahedron), + _ => None, } + .map(PolybladeMessage::Preset) + } else { + use ConwayMessage::*; + match key.as_str() { + // Operations + "e" => Some(Expand), + "d" => Some(Dual), + "s" => Some(Snub), + "k" => Some(Kis), + "j" => Some(Join), + "a" => Some(Ambo), + "t" => Some(Truncate), + "b" => Some(Bevel), + _ => None, + } + .map(PolybladeMessage::Conway) + }; + + if let (Some(message), Some(AppData { state, .. })) = (message, &mut self.data) + { + state.queue_message(message); } } WindowEvent::CursorMoved { position, .. } => { diff --git a/src/render/controls.rs b/src/render/controls.rs index d705bed2..f833c6db 100644 --- a/src/render/controls.rs +++ b/src/render/controls.rs @@ -34,7 +34,7 @@ impl Program for Controls { message.process(&mut self.state) } - fn view(&self) -> Element { + fn view(&self) -> Element<'_, Self::Message, Self::Theme, Self::Renderer> { let mut button_row = Row::new().spacing(10); for (i, color) in self .state