diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 76348c9..384085f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,15 +1,20 @@ -name: Github Pages +name: WebAssembly (GitHub Pages) + on: [push] + permissions: contents: write + jobs: deploy: runs-on: ubuntu-latest + permissions: pages: write id-token: write + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: mymindstorm/setup-emsdk@v11 with: @@ -24,6 +29,12 @@ jobs: - name: Rust Cache uses: Swatinem/rust-cache@v2 + - uses: pnpm/action-setup@v3 + name: Install pnpm + with: + version: 8 + run_install: true + - name: Build # build run: ./scripts/build.sh -er # release, skip emsdk diff --git a/.gitignore b/.gitignore index 04f88cd..ccb756c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /target /dist .idea -*.dll \ No newline at end of file +*.dll +node_modules +assets/build.css \ No newline at end of file diff --git a/assets/index.html b/assets/index.html index 40e4add..849f187 100644 --- a/assets/index.html +++ b/assets/index.html @@ -1,27 +1,52 @@ -
- - - - - + + + + + ++ This is a demo of a simple program written in Rust using the SDL2 + library and compiled to WebAssembly using Emscripten. The game loop is + implemented directly in Rust and uses Emscripten's Asyncify feature, as + well as hooks to +
+ ++ This demo uses all four SDL2 extensions; Image, Mixer, TTF, and GFX. +
+