From 554e34b90cf9f20cd3a15761fa5084162e2e2f5a Mon Sep 17 00:00:00 2001 From: issy Date: Sun, 24 May 2026 12:33:48 +0100 Subject: [PATCH 1/9] workdir --- firmware/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/Dockerfile b/firmware/Dockerfile index 00525ec..d137353 100644 --- a/firmware/Dockerfile +++ b/firmware/Dockerfile @@ -6,7 +6,8 @@ RUN rustup target add wasm32-unknown-unknown FROM builder -COPY . /app +WORKDIR /app +COPY . . WORKDIR /app/foundation From 7f9fe6d8b5180c6af2e3d3ab57be93202b3abc9f Mon Sep 17 00:00:00 2001 From: issy Date: Sun, 24 May 2026 12:51:15 +0100 Subject: [PATCH 2/9] Remove comment --- firmware/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/firmware/Dockerfile b/firmware/Dockerfile index d137353..2b452d7 100644 --- a/firmware/Dockerfile +++ b/firmware/Dockerfile @@ -16,7 +16,6 @@ RUN cargo build --target wasm32-unknown-unknown WORKDIR /app/firmware -# This failed RUN cargo build --target riscv32imac-unknown-none-elf WORKDIR /app/simulator From 4a17dbe85ae5ed02a5d9454f5778f4710ed504be Mon Sep 17 00:00:00 2001 From: issy Date: Sun, 24 May 2026 13:03:00 +0100 Subject: [PATCH 3/9] Many stages --- firmware/Dockerfile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/firmware/Dockerfile b/firmware/Dockerfile index 2b452d7..f1874fb 100644 --- a/firmware/Dockerfile +++ b/firmware/Dockerfile @@ -1,23 +1,29 @@ -FROM rust:1.94.0-alpine AS builder +FROM rust:1.94.0-alpine AS base LABEL authors="issy" -RUN rustup target add riscv32imac-unknown-none-elf -RUN rustup target add wasm32-unknown-unknown - -FROM builder - WORKDIR /app COPY . . -WORKDIR /app/foundation +FROM base AS builder-riscv -RUN cargo build --target riscv32imac-unknown-none-elf -RUN cargo build --target wasm32-unknown-unknown +RUN rustup target add riscv32imac-unknown-none-elf + +FROM base AS builder-wasm32 + +RUN rustup target add wasm32-unknown-unknown + +FROM builder-riscv AS firmware WORKDIR /app/firmware +RUN cargo build --target riscv32imac-unknown-none-elf +WORKDIR /app/foundation RUN cargo build --target riscv32imac-unknown-none-elf +FROM builder-wasm32 AS simulator + WORKDIR /app/simulator +RUN cargo build --target wasm32-unknown-unknown +WORKDIR /app/foundation RUN cargo build --target wasm32-unknown-unknown From 16fc9a93aa9818413f14df7f762f4498d39a6a31 Mon Sep 17 00:00:00 2001 From: issy Date: Sun, 24 May 2026 13:04:15 +0100 Subject: [PATCH 4/9] Fix rust version in image --- firmware/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/Dockerfile b/firmware/Dockerfile index f1874fb..01c7b89 100644 --- a/firmware/Dockerfile +++ b/firmware/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.94.0-alpine AS base +FROM rust:1.93.1-alpine AS base LABEL authors="issy" WORKDIR /app From b783204f900589ef74dd2d4a7062d6fd51c9a44b Mon Sep 17 00:00:00 2001 From: issy Date: Sun, 24 May 2026 13:08:02 +0100 Subject: [PATCH 5/9] Add wasm-pack and .dockerignore files --- .dockerignore | 4 ++++ firmware/.dockerignore | 17 +++++++++++++++++ firmware/Dockerfile | 26 +++++++++++++------------- web/.dockerignore | 26 ++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 13 deletions(-) create mode 100644 .dockerignore create mode 100644 firmware/.dockerignore create mode 100644 web/.dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..579801c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +# Ignore .DS_Store file in mac +**/.DS_Store + +.idea \ No newline at end of file diff --git a/firmware/.dockerignore b/firmware/.dockerignore new file mode 100644 index 0000000..6bc4d76 --- /dev/null +++ b/firmware/.dockerignore @@ -0,0 +1,17 @@ +# will have compiled files and executables +debug/ +target/ +pkg/ + +# Editor configuration +.vscode/ +.zed/ +.helix/ +.nvim.lua +.idea/**/copilot.data.migration.*.xml + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb diff --git a/firmware/Dockerfile b/firmware/Dockerfile index 01c7b89..0331178 100644 --- a/firmware/Dockerfile +++ b/firmware/Dockerfile @@ -1,18 +1,10 @@ -FROM rust:1.93.1-alpine AS base +FROM rust:1.93.1-slim AS base LABEL authors="issy" WORKDIR /app COPY . . -FROM base AS builder-riscv - -RUN rustup target add riscv32imac-unknown-none-elf - -FROM base AS builder-wasm32 - -RUN rustup target add wasm32-unknown-unknown - -FROM builder-riscv AS firmware +FROM base AS firmware WORKDIR /app/firmware RUN cargo build --target riscv32imac-unknown-none-elf @@ -20,10 +12,18 @@ RUN cargo build --target riscv32imac-unknown-none-elf WORKDIR /app/foundation RUN cargo build --target riscv32imac-unknown-none-elf -FROM builder-wasm32 AS simulator +FROM base AS simulator -WORKDIR /app/simulator +WORKDIR /app/foundation RUN cargo build --target wasm32-unknown-unknown -WORKDIR /app/foundation +WORKDIR /app/simulator RUN cargo build --target wasm32-unknown-unknown + +FROM simulator AS wasm-pack + +WORKDIR /app/simulator +RUN cargo install wasm-pack + +# resulting wasm file will be in /app/simulator/pkg/simulator_bg.wasm +RUN wasm-pack build --target web . diff --git a/web/.dockerignore b/web/.dockerignore new file mode 100644 index 0000000..9f26b1f --- /dev/null +++ b/web/.dockerignore @@ -0,0 +1,26 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +.wrangler From 84881db9b158ad9de8af47485babc490395cc479 Mon Sep 17 00:00:00 2001 From: issy Date: Mon, 25 May 2026 17:33:34 +0100 Subject: [PATCH 6/9] Bump pnpm version, add web dockerfile --- .dockerignore | 3 +- firmware/Dockerfile | 7 +- mise.lock | 124 +++++++++++++---- mise.toml | 4 +- web/Dockerfile | 13 ++ web/package.json | 13 +- web/pnpm-lock.yaml | 294 ++++++++++++++++++++++++++++++++++++++++ web/pnpm-workspace.yaml | 5 + 8 files changed, 431 insertions(+), 32 deletions(-) create mode 100644 web/Dockerfile create mode 100644 web/pnpm-workspace.yaml diff --git a/.dockerignore b/.dockerignore index 579801c..e732d9f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ # Ignore .DS_Store file in mac **/.DS_Store -.idea \ No newline at end of file +.idea +.git \ No newline at end of file diff --git a/firmware/Dockerfile b/firmware/Dockerfile index 0331178..d1861c0 100644 --- a/firmware/Dockerfile +++ b/firmware/Dockerfile @@ -20,10 +20,11 @@ RUN cargo build --target wasm32-unknown-unknown WORKDIR /app/simulator RUN cargo build --target wasm32-unknown-unknown -FROM simulator AS wasm-pack - -WORKDIR /app/simulator RUN cargo install wasm-pack # resulting wasm file will be in /app/simulator/pkg/simulator_bg.wasm RUN wasm-pack build --target web . + +FROM scratch AS simulator-wasm-pack-artefacts + +COPY --from=simulator /app/simulator/pkg /out/ diff --git a/mise.lock b/mise.lock index b7bb707..c0c4f3d 100644 --- a/mise.lock +++ b/mise.lock @@ -1,11 +1,28 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html + [[tools.buf]] version = "1.65.0" backend = "aqua:bufbuild/buf" -"platforms.linux-arm64" = { checksum = "sha256:53b4854a5ce61e02915e134370ad9c85f85cc3c906cbc464dddba5c450dee1ff", url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Linux-aarch64.tar.gz"} -"platforms.linux-x64" = { checksum = "sha256:15dfd76f882f6648aa3b9fcd23eaa149826cc9000a35bc89ced50ddca689e890", url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Linux-x86_64.tar.gz"} -"platforms.macos-arm64" = { checksum = "sha256:86e233aa35a1763dd00fd7651c0b0cb0067395260c337bb064b68c4c85a46e38", url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Darwin-arm64.tar.gz"} -"platforms.macos-x64" = { checksum = "sha256:c70d364478f61cd444455f03cfc44b503afd4cb0a47be045bad4553f117fbf7c", url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Darwin-x86_64.tar.gz"} -"platforms.windows-x64" = { checksum = "sha256:ca122b8ca406140e2f795d9fbb578e124773d50094df26e4a337f3735b7cf753", url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Windows-x86_64.zip"} + +[tools.buf."platforms.linux-arm64"] +checksum = "sha256:53b4854a5ce61e02915e134370ad9c85f85cc3c906cbc464dddba5c450dee1ff" +url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Linux-aarch64.tar.gz" + +[tools.buf."platforms.linux-x64"] +checksum = "sha256:15dfd76f882f6648aa3b9fcd23eaa149826cc9000a35bc89ced50ddca689e890" +url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Linux-x86_64.tar.gz" + +[tools.buf."platforms.macos-arm64"] +checksum = "sha256:86e233aa35a1763dd00fd7651c0b0cb0067395260c337bb064b68c4c85a46e38" +url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Darwin-arm64.tar.gz" + +[tools.buf."platforms.macos-x64"] +checksum = "sha256:c70d364478f61cd444455f03cfc44b503afd4cb0a47be045bad4553f117fbf7c" +url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Darwin-x86_64.tar.gz" + +[tools.buf."platforms.windows-x64"] +checksum = "sha256:ca122b8ca406140e2f795d9fbb578e124773d50094df26e4a337f3735b7cf753" +url = "https://github.com/bufbuild/buf/releases/download/v1.65.0/buf-Windows-x86_64.zip" [[tools.cargo]] version = "1.93.1" @@ -14,37 +31,94 @@ backend = "cargo" [[tools.hk]] version = "1.36.0" backend = "aqua:jdx/hk" -"platforms.linux-arm64" = { checksum = "sha256:51cf51e2035038ee64d772e71f8daf4978380ef82faffee2b12c413f009341ab", url = "https://github.com/jdx/hk/releases/download/v1.36.0/hk-aarch64-unknown-linux-gnu.tar.gz"} -"platforms.linux-x64" = { checksum = "sha256:d20fa0be3f1135abc74471670306ae0353ad2336804595362293f0c8460952e7", url = "https://github.com/jdx/hk/releases/download/v1.36.0/hk-x86_64-unknown-linux-gnu.tar.gz"} -"platforms.macos-arm64" = { checksum = "sha256:553ff3c7c18d91f1c1dcdbae44315db0324b52336b5a02ed5b9c382f08499b3b", url = "https://github.com/jdx/hk/releases/download/v1.36.0/hk-aarch64-apple-darwin.tar.gz"} -"platforms.windows-x64" = { checksum = "sha256:1f12218ccad806a3f49bcf521f86b6825fbd89486e830c1c04f72e3796f84589", url = "https://github.com/jdx/hk/releases/download/v1.36.0/hk-x86_64-pc-windows-msvc.zip"} + +[tools.hk."platforms.linux-arm64"] +checksum = "sha256:51cf51e2035038ee64d772e71f8daf4978380ef82faffee2b12c413f009341ab" +url = "https://github.com/jdx/hk/releases/download/v1.36.0/hk-aarch64-unknown-linux-gnu.tar.gz" + +[tools.hk."platforms.linux-x64"] +checksum = "sha256:d20fa0be3f1135abc74471670306ae0353ad2336804595362293f0c8460952e7" +url = "https://github.com/jdx/hk/releases/download/v1.36.0/hk-x86_64-unknown-linux-gnu.tar.gz" + +[tools.hk."platforms.macos-arm64"] +checksum = "sha256:553ff3c7c18d91f1c1dcdbae44315db0324b52336b5a02ed5b9c382f08499b3b" +url = "https://github.com/jdx/hk/releases/download/v1.36.0/hk-aarch64-apple-darwin.tar.gz" + +[tools.hk."platforms.windows-x64"] +checksum = "sha256:1f12218ccad806a3f49bcf521f86b6825fbd89486e830c1c04f72e3796f84589" +url = "https://github.com/jdx/hk/releases/download/v1.36.0/hk-x86_64-pc-windows-msvc.zip" [[tools.node]] version = "24.13.1" backend = "core:node" -"platforms.linux-arm64" = { checksum = "sha256:4873459d7c9b28feaa1f0fade9bb9c81cb702670991ff80a51d805325c5e3456", url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-linux-arm64.tar.gz"} -"platforms.linux-x64" = { checksum = "sha256:7ad28fb172a9ab0593f86c1a39e5c268d0d8fc3d6cb0167f455b5655a7a6e2fd", url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-linux-x64.tar.gz"} -"platforms.macos-arm64" = { checksum = "sha256:8c039d59f2fec6195e4281ad5b0d02b9a940897b4df7b849c6fb48be6787bba6", url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-darwin-arm64.tar.gz"} -"platforms.macos-x64" = { checksum = "sha256:527f0578d9812e7dfa225121bda0b1546a6a0e4b5f556295fc8299c272de5fbf", url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-darwin-x64.tar.gz"} -"platforms.windows-x64" = { checksum = "sha256:fba577c4bb87df04d54dd87bbdaa5a2272f1f99a2acbf9152e1a91b8b5f0b279", url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-win-x64.zip"} + +[tools.node."platforms.linux-arm64"] +checksum = "sha256:4873459d7c9b28feaa1f0fade9bb9c81cb702670991ff80a51d805325c5e3456" +url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-linux-arm64.tar.gz" + +[tools.node."platforms.linux-x64"] +checksum = "sha256:7ad28fb172a9ab0593f86c1a39e5c268d0d8fc3d6cb0167f455b5655a7a6e2fd" +url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-linux-x64.tar.gz" + +[tools.node."platforms.macos-arm64"] +checksum = "sha256:8c039d59f2fec6195e4281ad5b0d02b9a940897b4df7b849c6fb48be6787bba6" +url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-darwin-arm64.tar.gz" + +[tools.node."platforms.macos-x64"] +checksum = "sha256:527f0578d9812e7dfa225121bda0b1546a6a0e4b5f556295fc8299c272de5fbf" +url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-darwin-x64.tar.gz" + +[tools.node."platforms.windows-x64"] +checksum = "sha256:fba577c4bb87df04d54dd87bbdaa5a2272f1f99a2acbf9152e1a91b8b5f0b279" +url = "https://nodejs.org/dist/v24.13.1/node-v24.13.1-win-x64.zip" [[tools.pkl]] version = "0.30.2" backend = "aqua:apple/pkl" -"platforms.linux-arm64" = { checksum = "sha256:8da3ae65104eb7058e35dc4a9fe46bd8ece2b6faf4b65d0b1054cadb2ede0246", url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-linux-aarch64"} -"platforms.linux-x64" = { checksum = "sha256:474e5137d60a9e2320fde19a526f42c36d8e9d3b245139d59a9b8dff85283c76", url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-linux-amd64"} -"platforms.macos-arm64" = { checksum = "sha256:f1db44c0f6f859aee88c9d7d272f2371ae40ac95ec9957ae78eff51665158e04", url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-macos-aarch64"} -"platforms.macos-x64" = { checksum = "sha256:5f62ae7a7a34c15b3a83af17bda8e6b98516953f383a492340d4aa090caaa6d9", url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-macos-amd64"} -"platforms.windows-x64" = { checksum = "sha256:19e92aa59bcf4e54963b6e3b419af7e1b939f5793b44f4a08d60bab1217106f4", url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-windows-amd64.exe"} + +[tools.pkl."platforms.linux-arm64"] +checksum = "sha256:8da3ae65104eb7058e35dc4a9fe46bd8ece2b6faf4b65d0b1054cadb2ede0246" +url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-linux-aarch64" + +[tools.pkl."platforms.linux-x64"] +checksum = "sha256:474e5137d60a9e2320fde19a526f42c36d8e9d3b245139d59a9b8dff85283c76" +url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-linux-amd64" + +[tools.pkl."platforms.macos-arm64"] +checksum = "sha256:f1db44c0f6f859aee88c9d7d272f2371ae40ac95ec9957ae78eff51665158e04" +url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-macos-aarch64" + +[tools.pkl."platforms.macos-x64"] +checksum = "sha256:5f62ae7a7a34c15b3a83af17bda8e6b98516953f383a492340d4aa090caaa6d9" +url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-macos-amd64" + +[tools.pkl."platforms.windows-x64"] +checksum = "sha256:19e92aa59bcf4e54963b6e3b419af7e1b939f5793b44f4a08d60bab1217106f4" +url = "https://github.com/apple/pkl/releases/download/0.30.2/pkl-windows-amd64.exe" [[tools.pnpm]] -version = "10.29.3" +version = "11.2.2" backend = "aqua:pnpm/pnpm" -"platforms.linux-arm64" = { checksum = "sha256:ae70208882b2c5229e143de2454fc4f778b2d2ae959a2e48ec76a6c26e8b3127", url = "https://github.com/pnpm/pnpm/releases/download/v10.29.3/pnpm-linux-arm64"} -"platforms.linux-x64" = { checksum = "sha256:2fc98db127c611be0c110af11b5b72759f7d736893dddc81df73b7b59b30f15a", url = "https://github.com/pnpm/pnpm/releases/download/v10.29.3/pnpm-linux-x64"} -"platforms.macos-arm64" = { checksum = "sha256:a248c56b0ab20443e18d0c8ee3207c6c564ee342bd3fc8694b3569a060cecece", url = "https://github.com/pnpm/pnpm/releases/download/v10.29.3/pnpm-macos-arm64"} -"platforms.macos-x64" = { checksum = "sha256:569877025e8894d88b1756fdbc0675330dfcd9c01ece4ab26685baafffa8e303", url = "https://github.com/pnpm/pnpm/releases/download/v10.29.3/pnpm-macos-x64"} -"platforms.windows-x64" = { checksum = "sha256:51a217ad98e138a346da4a43c81bbc64a8ba6df7e2afa7bf5456a163f9105635", url = "https://github.com/pnpm/pnpm/releases/download/v10.29.3/pnpm-win-x64.exe"} + +[tools.pnpm."platforms.linux-arm64"] +checksum = "sha256:8c5da2d27cd86ac0ce0cee6d0b8d79b6353612351f761de3707dbc9d09d303fc" +url = "https://github.com/pnpm/pnpm/releases/download/v11.2.2/pnpm-linux-arm64.tar.gz" +provenance = "github-attestations" + +[tools.pnpm."platforms.linux-x64"] +checksum = "sha256:a35b592d85a208222fc354f15e9f04d08add1aff1382a30b48094ea8b618a302" +url = "https://github.com/pnpm/pnpm/releases/download/v11.2.2/pnpm-linux-x64.tar.gz" +provenance = "github-attestations" + +[tools.pnpm."platforms.macos-arm64"] +checksum = "sha256:89ab58c43ea3551aea88809ab5103a9a8356bbffe4382b2dc591129c2d0f54c0" +url = "https://github.com/pnpm/pnpm/releases/download/v11.2.2/pnpm-darwin-arm64.tar.gz" +provenance = "github-attestations" + +[tools.pnpm."platforms.windows-x64"] +checksum = "sha256:c904bff9595cd681bb8c396b454677a5294217e1726b7afca1839bbbb31a91d2" +url = "https://github.com/pnpm/pnpm/releases/download/v11.2.2/pnpm-win32-x64.zip" +provenance = "github-attestations" [[tools.rust]] version = "1.93.1" diff --git a/mise.toml b/mise.toml index 08a6009..72f9f3c 100644 --- a/mise.toml +++ b/mise.toml @@ -17,8 +17,8 @@ rust = { buf = "1.65.0" # Web -node = "24" -pnpm = "10.29.3" +node = "24.13.1" +pnpm = "11.2.2" [tasks] pre-commit = ["hk fix"] diff --git a/web/Dockerfile b/web/Dockerfile new file mode 100644 index 0000000..668f99b --- /dev/null +++ b/web/Dockerfile @@ -0,0 +1,13 @@ +FROM ghcr.io/pnpm/pnpm:11.2.2 AS base + +WORKDIR /app + +COPY . . +COPY --from=simulator-wasm-pack-artefacts /out/ /app/simulator-pkg/ + +RUN pnpm install --frozen-lockfile +RUN pnpm run build + +FROM scratch AS web-artefacts + +COPY --from=base /app/dist/ /out/ diff --git a/web/package.json b/web/package.json index 1e1ff38..84090ee 100644 --- a/web/package.json +++ b/web/package.json @@ -3,7 +3,18 @@ "private": true, "version": "0.0.0", "type": "module", - "packageManager": "pnpm@10.32.1", + "devEngines": { + "packageManager": { + "name": "pnpm", + "version": "11.2.2", + "onFail": "download" + }, + "runtime": { + "name": "node", + "version": "24.13.1", + "onFail": "download" + } + }, "scripts": { "dev": "vite", "build": "tsc -b && vite build", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 0944612..4914010 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -1,3 +1,202 @@ +--- +lockfileVersion: '9.0' + +importers: + + .: + configDependencies: {} + packageManagerDependencies: + '@pnpm/exe': + specifier: 11.2.2 + version: 11.2.2 + pnpm: + specifier: 11.2.2 + version: 11.2.2 + +packages: + + '@pnpm/exe@11.2.2': + resolution: {integrity: sha512-9AGho6f10GYF/XHvnpO6wnzDIAiHNSs2PyOTelrNNyUiHwfTVtnJoXwRz/6yPJAYOF3erhPauv5oxf62uh581w==} + hasBin: true + + '@pnpm/linux-arm64@11.2.2': + resolution: {integrity: sha512-cMEqyEwpghHb1UggKuowTuGKvbWe1Ra6bK3SF9CWoIrz36mzQz3FXxYXx1Theo8lmkwWH2MZdUGHKgtUoqEGKg==} + cpu: [arm64] + os: [linux] + + '@pnpm/linux-x64@11.2.2': + resolution: {integrity: sha512-AShxDdan9wfAFbIGAO5YnbGRf3zuETOZVMuWqmx4mJLaAOR3kiA3Rwhzj3jyTsAoodn7Xdaxq9G1M3FpB92mkQ==} + cpu: [x64] + os: [linux] + + '@pnpm/linuxstatic-arm64@11.2.2': + resolution: {integrity: sha512-m7BCdqFdMFo3fkiOpcOLa70c3Ppy5OKv78HXSIfzL4ajHBdPQfmv03VgC3U08l1ST/EeQFuSt+Za0azmOJyYqA==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@pnpm/linuxstatic-x64@11.2.2': + resolution: {integrity: sha512-UABTQUhdn6eCx/IlGVrdwklKT00pTHrjLNXdviP4OReJa1trM5HDWcDnreIg89ghCFmee+UTBKDx1FYlLON8EQ==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@pnpm/macos-arm64@11.2.2': + resolution: {integrity: sha512-EakwHSWIxzza6fO6zQkmkUphoadjer9VXCsWRax1D4qNWmChKfn2muYFj6BOChS999lwb4fb42gc61Nbx0X6iw==} + cpu: [arm64] + os: [darwin] + + '@pnpm/win-arm64@11.2.2': + resolution: {integrity: sha512-eXzlXAnwRAI9Uff1U2pfTJxC78vL8aGxU/fsUt/RzWjS09xMQZ2qtAunKg869fAi6xfsquDbogkdTZA3163lIw==} + cpu: [arm64] + os: [win32] + + '@pnpm/win-x64@11.2.2': + resolution: {integrity: sha512-X74bQ4bvjSCYapcupRsGrse8cAg7XhPKXRn1o1qOouux1nJquz9lh2h5uKz8GPx816OUsYo9FS8DV3N9W+L8QA==} + cpu: [x64] + os: [win32] + + '@reflink/reflink-darwin-arm64@0.1.19': + resolution: {integrity: sha512-ruy44Lpepdk1FqDz38vExBY/PVUsjxZA+chd9wozjUH9JjuDT/HEaQYA6wYN9mf041l0yLVar6BCZuWABJvHSA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@reflink/reflink-darwin-x64@0.1.19': + resolution: {integrity: sha512-By85MSWrMZa+c26TcnAy8SDk0sTUkYlNnwknSchkhHpGXOtjNDUOxJE9oByBnGbeuIE1PiQsxDG3Ud+IVV9yuA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@reflink/reflink-linux-arm64-gnu@0.1.19': + resolution: {integrity: sha512-7P+er8+rP9iNeN+bfmccM4hTAaLP6PQJPKWSA4iSk2bNvo6KU6RyPgYeHxXmzNKzPVRcypZQTpFgstHam6maVg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@reflink/reflink-linux-arm64-musl@0.1.19': + resolution: {integrity: sha512-37iO/Dp6m5DDaC2sf3zPtx/hl9FV3Xze4xoYidrxxS9bgP3S8ALroxRK6xBG/1TtfXKTvolvp+IjrUU6ujIGmA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@reflink/reflink-linux-x64-gnu@0.1.19': + resolution: {integrity: sha512-jbI8jvuYCaA3MVUdu8vLoLAFqC+iNMpiSuLbxlAgg7x3K5bsS8nOpTRnkLF7vISJ+rVR8W+7ThXlXlUQ93ulkw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@reflink/reflink-linux-x64-musl@0.1.19': + resolution: {integrity: sha512-e9FBWDe+lv7QKAwtKOt6A2W/fyy/aEEfr0g6j/hWzvQcrzHCsz07BNQYlNOjTfeytrtLU7k449H1PI95jA4OjQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@reflink/reflink-win32-arm64-msvc@0.1.19': + resolution: {integrity: sha512-09PxnVIQcd+UOn4WAW73WU6PXL7DwGS6wPlkMhMg2zlHHG65F3vHepOw06HFCq+N42qkaNAc8AKIabWvtk6cIQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@reflink/reflink-win32-x64-msvc@0.1.19': + resolution: {integrity: sha512-E//yT4ni2SyhwP8JRjVGWr3cbnhWDiPLgnQ66qqaanjjnMiu3O/2tjCPQXlcGc/DEYofpDc9fvhv6tALQsMV9w==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@reflink/reflink@0.1.19': + resolution: {integrity: sha512-DmCG8GzysnCZ15bres3N5AHCmwBwYgp0As6xjhQ47rAUTUXxJiK+lLUxaGsX3hd/30qUpVElh05PbGuxRPgJwA==} + engines: {node: '>= 10'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + pnpm@11.2.2: + resolution: {integrity: sha512-NuZiH61QYXiTZFXnAke4gI707CV5ep9DepMoGgIEhOJgf2pGmiLpgph8PbuIZuMHFRSrEKShdJ4G7c0ewRhDbw==} + engines: {node: '>=22.13'} + hasBin: true + +snapshots: + + '@pnpm/exe@11.2.2': + dependencies: + '@reflink/reflink': 0.1.19 + detect-libc: 2.1.2 + optionalDependencies: + '@pnpm/linux-arm64': 11.2.2 + '@pnpm/linux-x64': 11.2.2 + '@pnpm/linuxstatic-arm64': 11.2.2 + '@pnpm/linuxstatic-x64': 11.2.2 + '@pnpm/macos-arm64': 11.2.2 + '@pnpm/win-arm64': 11.2.2 + '@pnpm/win-x64': 11.2.2 + + '@pnpm/linux-arm64@11.2.2': + optional: true + + '@pnpm/linux-x64@11.2.2': + optional: true + + '@pnpm/linuxstatic-arm64@11.2.2': + optional: true + + '@pnpm/linuxstatic-x64@11.2.2': + optional: true + + '@pnpm/macos-arm64@11.2.2': + optional: true + + '@pnpm/win-arm64@11.2.2': + optional: true + + '@pnpm/win-x64@11.2.2': + optional: true + + '@reflink/reflink-darwin-arm64@0.1.19': + optional: true + + '@reflink/reflink-darwin-x64@0.1.19': + optional: true + + '@reflink/reflink-linux-arm64-gnu@0.1.19': + optional: true + + '@reflink/reflink-linux-arm64-musl@0.1.19': + optional: true + + '@reflink/reflink-linux-x64-gnu@0.1.19': + optional: true + + '@reflink/reflink-linux-x64-musl@0.1.19': + optional: true + + '@reflink/reflink-win32-arm64-msvc@0.1.19': + optional: true + + '@reflink/reflink-win32-x64-msvc@0.1.19': + optional: true + + '@reflink/reflink@0.1.19': + optionalDependencies: + '@reflink/reflink-darwin-arm64': 0.1.19 + '@reflink/reflink-darwin-x64': 0.1.19 + '@reflink/reflink-linux-arm64-gnu': 0.1.19 + '@reflink/reflink-linux-arm64-musl': 0.1.19 + '@reflink/reflink-linux-x64-gnu': 0.1.19 + '@reflink/reflink-linux-x64-musl': 0.1.19 + '@reflink/reflink-win32-arm64-msvc': 0.1.19 + '@reflink/reflink-win32-x64-msvc': 0.1.19 + + detect-libc@2.1.2: {} + + pnpm@11.2.2: {} + +--- lockfileVersion: '9.0' settings: @@ -90,6 +289,9 @@ importers: globals: specifier: ^16.5.0 version: 16.5.0 + node: + specifier: runtime:24.13.1 + version: runtime:24.13.1 postcss: specifier: ^8.5.8 version: 8.5.8 @@ -1567,6 +1769,96 @@ packages: node-releases@2.0.27: resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==} + node@runtime:24.13.1: + resolution: + type: variations + variants: + - resolution: + archive: tarball + bin: bin/node + integrity: sha256-iuBmSe6dptnq29KhoLCRw7k8eMkbam7ImQmZOrW64q4= + type: binary + url: https://nodejs.org/download/release/v24.13.1/node-v24.13.1-aix-ppc64.tar.gz + targets: + - cpu: ppc64 + os: aix + - resolution: + archive: tarball + bin: bin/node + integrity: sha256-jAOdWfL+xhleQoGtWw0CualAiXtN97hJxvtIvmeHu6Y= + type: binary + url: https://nodejs.org/download/release/v24.13.1/node-v24.13.1-darwin-arm64.tar.gz + targets: + - cpu: arm64 + os: darwin + - resolution: + archive: tarball + bin: bin/node + integrity: sha256-Un8FeNmBLn36IlEhvaCxVGpqDktfVWKV/IKZwnLeX78= + type: binary + url: https://nodejs.org/download/release/v24.13.1/node-v24.13.1-darwin-x64.tar.gz + targets: + - cpu: x64 + os: darwin + - resolution: + archive: tarball + bin: bin/node + integrity: sha256-SHNFnXybKP6qHw+t6bucgctwJnCZH/gKUdgFMlxeNFY= + type: binary + url: https://nodejs.org/download/release/v24.13.1/node-v24.13.1-linux-arm64.tar.gz + targets: + - cpu: arm64 + os: linux + - resolution: + archive: tarball + bin: bin/node + integrity: sha256-2oagoEtiLKvAyd6DYW6pN8HYoFqOr/iJVb3Bx+Ds7R0= + type: binary + url: https://nodejs.org/download/release/v24.13.1/node-v24.13.1-linux-ppc64le.tar.gz + targets: + - cpu: ppc64le + os: linux + - resolution: + archive: tarball + bin: bin/node + integrity: sha256-1F5eM3qNN7VX11v6pPhU8yWIwqz5df98OeT9k64h1jA= + type: binary + url: https://nodejs.org/download/release/v24.13.1/node-v24.13.1-linux-s390x.tar.gz + targets: + - cpu: s390x + os: linux + - resolution: + archive: tarball + bin: bin/node + integrity: sha256-etKPsXKpqwWT+GwaOeXCaNDY/D1ssBZ/RVtWVaem4v0= + type: binary + url: https://nodejs.org/download/release/v24.13.1/node-v24.13.1-linux-x64.tar.gz + targets: + - cpu: x64 + os: linux + - resolution: + archive: zip + bin: node.exe + integrity: sha256-DNKe62TzxknbLEyGh3nKJ39aTEnibGnlko0B/grgbag= + prefix: node-v24.13.1-win-arm64 + type: binary + url: https://nodejs.org/download/release/v24.13.1/node-v24.13.1-win-arm64.zip + targets: + - cpu: arm64 + os: win32 + - resolution: + archive: zip + bin: node.exe + integrity: sha256-+6V3xLuH3wTVTdh7vapaInLx+Zoqy/kVLhqRuLXwsnk= + prefix: node-v24.13.1-win-x64 + type: binary + url: https://nodejs.org/download/release/v24.13.1/node-v24.13.1-win-x64.zip + targets: + - cpu: x64 + os: win32 + version: 24.13.1 + hasBin: true + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -3487,6 +3779,8 @@ snapshots: node-releases@2.0.27: {} + node@runtime:24.13.1: {} + optionator@0.9.4: dependencies: deep-is: 0.1.4 diff --git a/web/pnpm-workspace.yaml b/web/pnpm-workspace.yaml new file mode 100644 index 0000000..14c8d7b --- /dev/null +++ b/web/pnpm-workspace.yaml @@ -0,0 +1,5 @@ +allowBuilds: + '@parcel/watcher': false + esbuild: false + sharp: false + workerd: false From 9eac15655698153a4dacf4b8e8bbdfae0d711ec9 Mon Sep 17 00:00:00 2001 From: issy Date: Mon, 25 May 2026 17:33:49 +0100 Subject: [PATCH 7/9] Add docker image workflow --- .github/workflows/docker.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..d3e8099 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,16 @@ +name: docker.yml +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Build Simulator Image + run: docker build -t simulator-wasm-pack-artefacts ./firmware + + - name: Build Web Image + run: docker build -t web-artefacts ./web From 7ab18c9492bf62f86c0e64a2360b21ed18a8bbf2 Mon Sep 17 00:00:00 2001 From: issy Date: Mon, 25 May 2026 17:41:07 +0100 Subject: [PATCH 8/9] Fixes --- firmware/Dockerfile | 5 +++++ firmware/rust-toolchain.toml | 2 +- web/package.json | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/Dockerfile b/firmware/Dockerfile index d1861c0..3502dc6 100644 --- a/firmware/Dockerfile +++ b/firmware/Dockerfile @@ -28,3 +28,8 @@ RUN wasm-pack build --target web . FROM scratch AS simulator-wasm-pack-artefacts COPY --from=simulator /app/simulator/pkg /out/ + +FROM base AS check-formatting + +WORKDIR /app +CMD ["cargo", "fmt", "--all", "--check"] diff --git a/firmware/rust-toolchain.toml b/firmware/rust-toolchain.toml index 7669e52..f8decf0 100644 --- a/firmware/rust-toolchain.toml +++ b/firmware/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] channel = "1.93.1" -components = ["rust-src"] +components = ["rust-src", "rustfmt"] targets = ["riscv32imac-unknown-none-elf", "wasm32-unknown-unknown"] diff --git a/web/package.json b/web/package.json index 84090ee..fad1e9d 100644 --- a/web/package.json +++ b/web/package.json @@ -3,6 +3,7 @@ "private": true, "version": "0.0.0", "type": "module", + "packageManager": "pnpm@11.2.2", "devEngines": { "packageManager": { "name": "pnpm", From 4370ef0732344a8d4be2bcd48dba5bd9c3ee90c7 Mon Sep 17 00:00:00 2001 From: issy Date: Mon, 25 May 2026 17:51:43 +0100 Subject: [PATCH 9/9] Extra step --- .github/workflows/docker.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d3e8099..67d4e41 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,8 +9,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 - - name: Build Simulator Image - run: docker build -t simulator-wasm-pack-artefacts ./firmware + - name: Build Firmware Image + run: docker build ./firmware + + - name: Create Simulator Label + run: docker build -t simulator-wasm-pack-artefacts --target simulator-wasm-pack-artefacts ./firmware - name: Build Web Image run: docker build -t web-artefacts ./web