You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demo/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Static playground at [demo.edgepython.com](https://demo.edgepython.com/), runs E
11
11
12
12
## Local start
13
13
14
-
The page fetches WASM and uses a Web Worker, so it must be served over HTTP (`file://` fails with CORS). [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) is the easiest dev option. Runtime JS and `compiler.wasm` pull from `runtime.edgepython.com`, demo, runtime, and compiler version independently.
14
+
The page fetches WASM and uses a Web Worker, so it must be served over HTTP (`file://` fails with CORS). [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) is the easiest dev option. Runtime JS and `compiler.wasm` pull from `cdn.edgepython.com`, demo, runtime, and compiler version independently.
/* Dev/prod switch for runtime JS: local checkout in dev, edge-python-runtime in prod. Mirrors index.html's Tailwind switch, preserves dev-edit-refresh loop without bundling. */
Pre-built `.wasm` is served from `https://std.edgepython.com/json.wasm`. Full API: [`std/json/README.md`](https://github.com/dylan-sutton-chavez/edge-python/tree/main/std/json).
33
+
Pre-built `.wasm` is served from `https://cdn.edgepython.com/std/json.wasm`. Full API: [`std/json/README.md`](https://github.com/dylan-sutton-chavez/edge-python/tree/main/std/json).
34
34
35
35
> **`json` is an external `.wasm` package, not built into `compiler.wasm`** — the browser runtime just resolves it by [default](#defaults), so `from json import ...` works with no manifest.
36
36
@@ -46,7 +46,7 @@ print(sub(r'\s+', '_', 'a b c')) # a_b_c
46
46
print(findall(r'\w+', 'one two three')) # ['one', 'two', 'three']
47
47
```
48
48
49
-
Functions: `match`, `search`, `fullmatch`, `findall`, `groups`, `span`, `sub`; flags go inline (`(?i)`, `(?s)`, `(?m)`). Pre-built `.wasm` is served from `https://std.edgepython.com/re.wasm`. Full API: [`std/re/README.md`](https://github.com/dylan-sutton-chavez/edge-python/tree/main/std/re).
49
+
Functions: `match`, `search`, `fullmatch`, `findall`, `groups`, `span`, `sub`; flags go inline (`(?i)`, `(?s)`, `(?m)`). Pre-built `.wasm` is served from `https://cdn.edgepython.com/std/re.wasm`. Full API: [`std/re/README.md`](https://github.com/dylan-sutton-chavez/edge-python/tree/main/std/re).
50
50
51
51
### `math`
52
52
@@ -61,7 +61,7 @@ print(hypot(3, 4, 12)) # 13.0
61
61
print(factorial(5)) # 120
62
62
```
63
63
64
-
Integers are bounded by the VM's `i128`, so `factorial`, `comb`, `perm`, and `lcm` raise `ValueError` past that range, and there is no `complex` / `cmath`. Pre-built `.wasm` is served from `https://std.edgepython.com/math.wasm`. Full API: [`std/math/README.md`](https://github.com/dylan-sutton-chavez/edge-python/tree/main/std/math).
64
+
Integers are bounded by the VM's `i128`, so `factorial`, `comb`, `perm`, and `lcm` raise `ValueError` past that range, and there is no `complex` / `cmath`. Pre-built `.wasm` is served from `https://cdn.edgepython.com/std/math.wasm`. Full API: [`std/math/README.md`](https://github.com/dylan-sutton-chavez/edge-python/tree/main/std/math).
65
65
66
66
### `test`
67
67
@@ -88,7 +88,7 @@ run() # prints PASS/FAIL lines and a summary, then raises SystemExit(0 if all pa
88
88
89
89
`@fixture` registers a `def` under its name and injects it by keyword into the tests that ask for it; `@test(description, *uses)` registers a test plus the fixtures it pulls; `raises(ExcType)` is a context manager asserting the block raises `ExcType` (a subclass, or any type in a tuple); `run()` executes every registered test, prints `PASS` / `FAIL` / `ERROR` and a summary, then raises `SystemExit(1 if any failed, else 0)` so a host can read the result as a process exit code.
90
90
91
-
Unlike the other standard packages, `test` ships as **pure Edge Python source** (`src/entry.py`), not a compiled `.wasm`, so there is no `cargo` build; it is served from `https://std.edgepython.com/test.py` and the browser runtime resolves it by default, importing the `.py` directly (see [Defaults](#defaults)). Full API: [`std/test/README.md`](https://github.com/dylan-sutton-chavez/edge-python/tree/main/std/test).
91
+
Unlike the other standard packages, `test` ships as **pure Edge Python source** (`src/entry.py`), not a compiled `.wasm`, so there is no `cargo` build; it is served from `https://cdn.edgepython.com/std/test.py` and the browser runtime resolves it by default, importing the `.py` directly (see [Defaults](#defaults)). Full API: [`std/test/README.md`](https://github.com/dylan-sutton-chavez/edge-python/tree/main/std/test).
0 commit comments