sagebrush-web 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/package.json +1 -1
- package/pyparse.mjs +12 -12
- package/sagebrush-engine.mjs +5 -2
package/README.md
CHANGED
|
@@ -5,23 +5,24 @@ the only jsdelivr path Claude's artifact sandbox allows; `/gh/<repo>@<commit>/cd
|
|
|
5
5
|
also works elsewhere):
|
|
6
6
|
|
|
7
7
|
```js
|
|
8
|
-
const sb = await import("https://cdn.jsdelivr.net/npm/sagebrush-web@0.
|
|
9
|
-
const py = await import("https://cdn.jsdelivr.net/npm/sagebrush-web@0.
|
|
8
|
+
const sb = await import("https://cdn.jsdelivr.net/npm/sagebrush-web@0.3/sagebrush-engine.mjs");
|
|
9
|
+
const py = await import("https://cdn.jsdelivr.net/npm/sagebrush-web@0.3/pyparse.mjs");
|
|
10
10
|
sb.charpoly({ n: 1, k: 12, q: 2, sign: 1 }); // proven, over Z[zeta_m]
|
|
11
11
|
py.parse("x = [1, 2 3]\n"); // throws CPython's SyntaxError
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
| File | Raw | Gzipped (as served) | What |
|
|
15
15
|
|---|---|---|---|
|
|
16
|
-
| `sagebrush-engine.mjs` |
|
|
17
|
-
| `pyparse.mjs` |
|
|
16
|
+
| `sagebrush-engine.mjs` | 2.0 MB | 1.5 MB | the Rust engines (`engine/web`, wasm32), gzipped and inlined as base64 (decompressed with `DecompressionStream`): the same `wasm/sagebrush-engine.wasm` as the notebook and CLI |
|
|
17
|
+
| `pyparse.mjs` | 217 KB | 33 KB | CPython 3.14's parser (`pyparse/`) |
|
|
18
18
|
|
|
19
19
|
Why this shape: in the October 2026 smoke test, Claude's artifact sandbox
|
|
20
20
|
blocked `fetch()` to every CDN and `import()` from esm.sh, but allowed
|
|
21
21
|
`import()` from cdn.jsdelivr.net and `<script>` from cdnjs. ChatGPT allowed
|
|
22
22
|
more. WebAssembly from inline bytes worked in both; cross-origin isolation
|
|
23
23
|
(WASM threads) in neither. So the engines are single-threaded and ship
|
|
24
|
-
inside the JS module. Rebuild with `node cdn/build.mjs
|
|
25
|
-
`
|
|
26
|
-
|
|
24
|
+
inside the JS module. Rebuild with `node cdn/build.mjs` (after `node scripts/build-engine.mjs`);
|
|
25
|
+
CI checks the engine with `node cdn/build.mjs --check`, and a `v*` release
|
|
26
|
+
rebuilds both modules before publishing. Licensing:
|
|
27
|
+
see `NOTICE.md` (Sagebrush's own code is MIT OR Apache-2.0; the pyparse parts
|
|
27
28
|
derived from CPython are PSF-2.0).
|
package/package.json
CHANGED