Skip to content

Commit

Permalink
Switch from stdweb to websys for #21.
Browse files Browse the repository at this point in the history
When I added web support in February, it was easier to get started with
stdweb, since it has the nice cargo web tool. However, stdweb is
unmaintained, winit is deprecating support for it, and the next steps
for web (downloading maps dynamically) have better support for web-sys.

With Alvin's guidance, I got
https://github.com/dabreegster/minimal_websys_winit_glow_demo working
first. This PR cuts A/B Street over too.

I tested abst and the widgetry demo in both native and web. The only
major regression from stdweb is the canvas placement and size. I
attempted some fixes, but at this point, I'll leave it as a smaller
followup instead.
  • Loading branch information
dabreegster committed Oct 6, 2020
1 parent 14cbb0f commit 3110925
Show file tree
Hide file tree
Showing 20 changed files with 949 additions and 1,647 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ jobs:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: 1.46.0
- name: Install cargo-web
run: cargo install cargo-web
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Cache build
uses: actions/cache@v2
with:
Expand All @@ -112,5 +112,5 @@ jobs:
key: wasm-build
- name: Build game
working-directory: game
run: cargo web check --target wasm32-unknown-unknown --no-default-features --features wasm
run: wasm-pack build --dev --target web -- --no-default-features --features wasm
# TODO For now, just check that the build works. Later, build fully and package.
Loading

0 comments on commit 3110925

Please sign in to comment.