diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 8c779d35..f4f327f3 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -47,11 +47,10 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable + default: true + target: wasm32-unknown-unknown - - run: | - rustup default stable - rustup target add wasm32-unknown-unknown - cargo install wasm-pack + - run: cargo install wasm-pack - uses: mymindstorm/setup-emsdk@v14 with: diff --git a/c/Makefile b/c/Makefile index 2a5678c8..7adef637 100644 --- a/c/Makefile +++ b/c/Makefile @@ -68,9 +68,9 @@ native_test: native clean: @rm -rf build dist {.,*,*/*}/{*.pyc,__pycache__,.mypy_cache,.pytest_cache,.benchmarks} || echo -dist/lib.wasm: build/c-lib.c +dist/c-lib.wasm: build/lib.c @mkdir -p dist - @emcc build/lib.c -Wl,--whole-archive -DUNITY_END -O$(O) -o dist/c-lib.js + @emcc build/lib.c -Wl,--whole-archive -DUNITY_END -O$(O) -o dist/c-lib.mjs build/lib.c: ../LICENSE @mkdir -p build diff --git a/cplusplus/Makefile b/cplusplus/Makefile index 04535315..a842df99 100644 --- a/cplusplus/Makefile +++ b/cplusplus/Makefile @@ -62,7 +62,7 @@ clean: dist/cp-lib.wasm: build/lib.cpp @mkdir -p dist - @emcc build/lib.cpp -Wl,--whole-archive -DUNITY_END -O$(O) -o dist/cp-lib.js + @emcc build/lib.cpp -Wl,--whole-archive -DUNITY_END -O$(O) -o dist/cp-lib.mjs build/lib.cpp: ../LICENSE @mkdir -p build diff --git a/docs/Makefile b/docs/Makefile index 7662f667..5e34562c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -42,13 +42,16 @@ _static/dist/bundle.js: _static/dist/c-lib.js: @$(MAKE) -C ../c dist/c-lib.wasm $(MFLAGS) + @mkdir -p _static/dist @cp ../c/dist/c-lib.* _static/dist/ _static/dist/cp-lib.js: @$(MAKE) -C ../cplusplus dist/cp-lib.wasm $(MFLAGS) - @cp ../c/dist/cp-lib.* _static/dist/ + @mkdir -p _static/dist + @cp ../cplusplus/dist/cp-lib.* _static/dist/ _static/dist/rust.js: + @mkdir -p _static/dist @cd ../rust && wasm-pack build --target web --out-dir ../docs/_static/dist/ _static/dist/python.tar.gz: diff --git a/docs/_static/test-c.html b/docs/_static/test-c.html index 73331d28..418d3779 100644 --- a/docs/_static/test-c.html +++ b/docs/_static/test-c.html @@ -11,49 +11,51 @@