Commit bbb2ab9
committed
gh-127111: Make web example work again
I moved the web example from `Tools/wasm` into `Tools/wasm/emscripten/web_example`.
I also added a new target `build_emscripten` which is `build_wasm` but also
builds the web_example. The web_example needs:
1. python.html, copied
2. python.worker.mjs copied
3. python.mjs and python.wasm output from the main linking of the Python interpreter
4. The webserver that sets COOP and COEP
5. python3.14.zip
This last is created by the `wasm_assets.py` script, which required a pretty
small set of changes to work fine for us.
The last thing that should be done is the `python.worker.mjs` script should be
made independent of the Python version: currently 3.14 is hard coded. I ran
into trouble doing this, so maybe I can leave it to a followup.1 parent ff2278e commit bbb2ab9
File tree
7 files changed
+83
-56
lines changed- Tools/wasm/emscripten/web_example
7 files changed
+83
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | 272 | | |
277 | 273 | | |
278 | 274 | | |
| |||
737 | 733 | | |
738 | 734 | | |
739 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
740 | 739 | | |
741 | 740 | | |
742 | 741 | | |
| |||
1016 | 1015 | | |
1017 | 1016 | | |
1018 | 1017 | | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
1022 | 1028 | | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
1027 | 1036 | | |
1028 | | - | |
1029 | | - | |
| 1037 | + | |
| 1038 | + | |
1030 | 1039 | | |
1031 | | - | |
1032 | | - | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
1033 | 1047 | | |
1034 | | - | |
1035 | | - | |
| 1048 | + | |
| 1049 | + | |
1036 | 1050 | | |
1037 | 1051 | | |
1038 | 1052 | | |
| |||
3053 | 3067 | | |
3054 | 3068 | | |
3055 | 3069 | | |
3056 | | - | |
3057 | | - | |
| 3070 | + | |
3058 | 3071 | | |
3059 | 3072 | | |
3060 | 3073 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
| 350 | + | |
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| |||
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
72 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
73 | 88 | | |
| 89 | + | |
74 | 90 | | |
75 | 91 | | |
76 | 92 | | |
77 | 93 | | |
78 | 94 | | |
79 | | - | |
| 95 | + | |
80 | 96 | | |
81 | 97 | | |
82 | 98 | | |
83 | 99 | | |
84 | 100 | | |
85 | 101 | | |
86 | 102 | | |
87 | | - | |
| |||
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 17 | | |
25 | 18 | | |
26 | 19 | | |
| |||
42 | 35 | | |
43 | 36 | | |
44 | 37 | | |
| 38 | + | |
45 | 39 | | |
46 | 40 | | |
Lines changed: 12 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
114 | 112 | | |
115 | 113 | | |
116 | 114 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 115 | + | |
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
| |||
131 | 127 | | |
132 | 128 | | |
133 | 129 | | |
134 | | - | |
| 130 | + | |
135 | 131 | | |
136 | 132 | | |
137 | 133 | | |
| |||
195 | 191 | | |
196 | 192 | | |
197 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
| |||
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
207 | | - | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
237 | | - | |
238 | | - | |
239 | 238 | | |
240 | 239 | | |
241 | | - | |
242 | | - | |
| 240 | + | |
| 241 | + | |
243 | 242 | | |
244 | 243 | | |
245 | 244 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1854 | 1854 | | |
1855 | 1855 | | |
1856 | 1856 | | |
1857 | | - | |
1858 | | - | |
1859 | | - | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
1860 | 1864 | | |
1861 | 1865 | | |
1862 | 1866 | | |
| |||
2321 | 2325 | | |
2322 | 2326 | | |
2323 | 2327 | | |
2324 | | - | |
| 2328 | + | |
2325 | 2329 | | |
2326 | 2330 | | |
2327 | 2331 | | |
2328 | 2332 | | |
2329 | 2333 | | |
2330 | 2334 | | |
2331 | | - | |
| 2335 | + | |
2332 | 2336 | | |
2333 | 2337 | | |
2334 | 2338 | | |
| |||
2339 | 2343 | | |
2340 | 2344 | | |
2341 | 2345 | | |
2342 | | - | |
2343 | 2346 | | |
2344 | 2347 | | |
2345 | 2348 | | |
| |||
0 commit comments