Skip to content

Commit 5704ab4

Browse files
Rename: Serve compiler.wasm from cdn.edgepython.com root, fix CDN subfolder.
1 parent e05fcbf commit 5704ab4

11 files changed

Lines changed: 14 additions & 15 deletions

File tree

.github/actions/cdn-deploy/action.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,13 @@ runs:
3535
- name: Stage site
3636
shell: bash
3737
run: |
38-
mkdir -p _site/compiler _site/runtime _site/std _site/host _site/cli
38+
mkdir -p _site/runtime _site/std _site/host _site/cli
3939
40-
# compiler: the wasm module.
41-
cp /tmp/compiler/compiler.wasm _site/compiler/
40+
# compiler: the wasm module, served at the CDN root (cdn.edgepython.com/compiler.wasm).
41+
cp /tmp/compiler/compiler.wasm _site/compiler.wasm
4242
43-
# runtime: JS sources plus the wasm it bundles.
43+
# runtime: JS sources; the wasm is loaded from the CDN root, not bundled here.
4444
cp -r runtime/. _site/runtime/
45-
cp /tmp/compiler/compiler.wasm _site/runtime/
4645
4746
# std: <pkg>.wasm / <pkg>.py.
4847
cp -r /tmp/std/. _site/std/

cli/src/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::pkg::{self, Kind, Manifest};
1212

1313
// Production layout we mirror into dist/runtime/ and dist/.
1414
const RUNTIME_BASE: &str = "https://runtime.edgepython.com/js/";
15-
const COMPILER_WASM: &str = "https://runtime.edgepython.com/js/compiler.wasm";
15+
const COMPILER_WASM: &str = "https://cdn.edgepython.com/compiler.wasm";
1616
const RUNTIME_FILES: &[&str] = &[
1717
"src/index.js",
1818
"src/element.js",

demo/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ ok('Loading WASM...');
8787
try {
8888
const ver = await fetch('./version.json', { cache: 'no-store' }).then(r => r.json()).catch(() => ({}));
8989
const bust = ver.v ? `?v=${ver.v}` : '';
90-
const wasmUrl = `https://runtime.edgepython.com/js/compiler.wasm${bust}`;
90+
const wasmUrl = `https://cdn.edgepython.com/compiler.wasm${bust}`;
9191

9292
const t0 = performance.now();
9393
worker = await createWorker({ wasmUrl, integrity: true, version: ver.v });

docs/pages/reference/writing-modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const dom = ({ pushEvent }) => {
102102
import { dom } from "./dom.js";
103103
104104
const worker = await createWorker({
105-
wasmUrl: "https://runtime.edgepython.com/js/compiler.wasm",
105+
wasmUrl: "https://cdn.edgepython.com/compiler.wasm",
106106
mainThreadModules: { dom },
107107
});
108108
await worker.run(await (await fetch("./script.py")).text());

host/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ One folder per capability. Each ships a `<name>/<name>.json` corpus; the shared
2626
import { dom } from "./dom/src/index.js";
2727
2828
const worker = await createWorker({
29-
wasmUrl: "https://runtime.edgepython.com/js/compiler.wasm",
29+
wasmUrl: "https://cdn.edgepython.com/compiler.wasm",
3030
mainThreadModules: { dom },
3131
});
3232
await worker.run(await (await fetch("./script.py")).text());

host/dom/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def main():
2222
import { dom } from "./src/index.js";
2323
2424
const worker = await createWorker({
25-
wasmUrl: "https://runtime.edgepython.com/js/compiler.wasm",
25+
wasmUrl: "https://cdn.edgepython.com/compiler.wasm",
2626
mainThreadModules: { dom },
2727
});
2828
await worker.run(await (await fetch("./script.py")).text());

host/network/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def main():
2828
import { network } from "./src/index.js";
2929
3030
const worker = await createWorker({
31-
wasmUrl: "https://runtime.edgepython.com/js/compiler.wasm",
31+
wasmUrl: "https://cdn.edgepython.com/compiler.wasm",
3232
mainThreadModules: { network },
3333
});
3434
await worker.run(await (await fetch("./script.py")).text());

host/storage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ print(note["title"]) # -> "hello"
2323
import { storage } from "./src/index.js";
2424
2525
const worker = await createWorker({
26-
wasmUrl: "https://runtime.edgepython.com/js/compiler.wasm",
26+
wasmUrl: "https://cdn.edgepython.com/compiler.wasm",
2727
mainThreadModules: { storage },
2828
});
2929
await worker.run(await (await fetch("./script.py")).text());

host/time/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ print(strftime("%Y-%m-%d %H:%M:%S", gmtime(0))) # 1970-01-01 00:00:00
1818
import { time } from "./src/index.js";
1919
2020
const worker = await createWorker({
21-
wasmUrl: "https://runtime.edgepython.com/js/compiler.wasm",
21+
wasmUrl: "https://cdn.edgepython.com/compiler.wasm",
2222
mainThreadModules: { time },
2323
});
2424
await worker.run(await (await fetch("./script.py")).text());

runtime/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { createWorker } from "https://runtime.edgepython.com/js/src/index.js";
1515

1616
```js
1717
const worker = await createWorker({
18-
wasmUrl: "https://runtime.edgepython.com/js/compiler.wasm",
18+
wasmUrl: "https://cdn.edgepython.com/compiler.wasm",
1919
integrity: true, // default: IDB + lockfile CAS
2020
imports: { dom: "./dom.wasm" }, // bare-name shortcut, optional
2121
loaders: [], // opt-in module loaders, optional

0 commit comments

Comments
 (0)