From 9f46a0ad6cd1912f09bed1ca9b8c42f5cd83449a Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Wed, 21 Aug 2024 18:13:41 -0500 Subject: [PATCH] Try doing a module version --- .github/workflows/pages.yml | 7 ++-- README.rst | 8 ++-- c/Makefile | 4 +- cplusplus/Makefile | 2 +- docs/Makefile | 5 ++- docs/_static/test-c.html | 78 +++++++++++++++++++------------------ docs/_static/test-cp.html | 78 +++++++++++++++++++------------------ 7 files changed, 96 insertions(+), 86 deletions(-) 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/README.rst b/README.rst index 35fbe74b..c00dbb8a 100644 --- a/README.rst +++ b/README.rst @@ -122,10 +122,10 @@ Olivia's Project Euler Solutions click here! .. [1] This is the earliest standard the MSVC explicitly supports. -.. .. [2] (This target is not yet complete.) While these solutions do run in most browsers, they need to be bundled with Emscripten first, -.. and these tests not yet automated as in |clang| and |gcc|. To run these tests yourself, |test-c-link| -.. .. [3] (This target is not yet complete.) While these solutions do run in most browsers, they need to be bundled with Emscripten first, -.. and these tests not yet automated as in |clang| and |gcc|. To run these tests yourself, |test-cp-link| +.. [2] While these solutions do run in most browsers, they need to be bundled with Emscripten first, + and these tests not yet automated as in |clang| and |gcc|. To run these tests yourself, |test-c-link| +.. [3] While these solutions do run in most browsers, they need to be bundled with Emscripten first, + and these tests not yet automated as in |clang| and |gcc|. To run these tests yourself, |test-cp-link| .. .. [#] (This target is not yet complete.) While these solutions do run in most browsers, they need to be bundled with DotNetAnywhere first, .. and these tests not yet automated as in mainline .NET. To run these tests yourself, |test-cs-link| .. .. [#] (This target is not yet complete.) While these solutions do run in most browsers, they need to be bundled with CheerpJ first, 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..bf77a698 100644 --- a/docs/_static/test-c.html +++ b/docs/_static/test-c.html @@ -11,49 +11,53 @@