aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--site/main.mjs6
-rw-r--r--site/rust.mjs2
-rw-r--r--site/wasm.mjs2
4 files changed, 9 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 677f573..e6767f2 100644
--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,10 @@ WASMPACKFLAGS=--no-pack --no-typescript
# the --target is currently necessary or firefox will return
# "disallowed mime type" -bjc 7-aug-2025
-build:
- wasm-pack build --target web --out-dir $(BUILDDIR)/wasm $(WASMPACKFLAGS)
+rust:
+ wasm-pack build --target web --out-dir $(BUILDDIR)/rust $(WASMPACKFLAGS)
+
+build: rust
serve: build
(cd $(BUILDDIR) && python -m http.server 8118)
diff --git a/site/main.mjs b/site/main.mjs
index 1457958..e1760e9 100644
--- a/site/main.mjs
+++ b/site/main.mjs
@@ -1,8 +1,8 @@
let type = 'pure';
-let alts = ['wasm'];
+let alts = ['rust'];
switch (self.location.search) {
-case '?wasm':
- type = 'wasm';
+case '?rust':
+ type = 'rust';
alts = ['pure'];
break;
}
diff --git a/site/rust.mjs b/site/rust.mjs
new file mode 100644
index 0000000..200525b
--- /dev/null
+++ b/site/rust.mjs
@@ -0,0 +1,2 @@
+import init from './rust/polyring.js';
+export default init;
diff --git a/site/wasm.mjs b/site/wasm.mjs
deleted file mode 100644
index e11f642..0000000
--- a/site/wasm.mjs
+++ /dev/null
@@ -1,2 +0,0 @@
-import init from './wasm/polyring.js';
-export default init;