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
A compact bytecode compiler and stack VM for a sandboxed Python subset, written in Rust. See [Design](https://edgepython.com/implementation/design) for the architecture.
9
+
<br/>
4
10
5
-
Edge Python is distributed as a WebAssembly module, `compiler.wasm`, around 170 KB. It runs anywhere WebAssembly runs: browsers, Cloudflare Workers, Fastly Compute, Wasmtime, Wasmer, Spin. Sandboxed by construction.
11
+
Edge is a sandboxed subset of Python, compiled to a less than 200 KB WebAssembly binary and built in Rust to run on Cloudflare Workers and in the browser. Embed your full business logic, run LLMs client-side, build frontend apps and serverless workloads.
- Secure by default. No file, network, or environment access, unless explicitly enabled by the [host](https://edgepython.com/reference/packages#host-libraries).
14
+
- Less than 200 KB footprint. The full compiler and runtime ship as a single WASM binary.
15
+
- Compile-time imports. Every module resolves at parse time no dynamic loading, no runtime surprises.
16
+
- No AST, source compiles directly to bytecode in a single pass: o(n)
@@ -36,30 +49,32 @@ Native modules ship via three delivery paths (CDN `.wasm`, host capability, JS h
36
49
37
50
### CLI
38
51
52
+
download it to your machine ([reference docs](https://edgepython.com/reference/cli)):
53
+
39
54
```bash
40
-
cargo install --path cli
41
-
edge init my-app &&cd my-app
42
-
edge run main.py
55
+
curl -fsSL https://dylan-sutton-chavez.github.io/edge-python/install.sh | sh
56
+
57
+
edge -h # List all commands
43
58
```
44
59
45
-
`edge` hosts the runtime in a headless Chromium provisioned by `install.sh` (apt, dnf, pacman, zypper, apk, or brew on macOS); see [`cli/README.md`](cli/README.md)for `serve`, `repl`, `build`,`uninstall`.
60
+
`edge` hosts the runtime in a headless Chromium provisioned by `install.sh` (apt, dnf, pacman, zypper, apk, or brew on macOS)for `serve`, `repl`, `build` and`uninstall`.
The runtime spawns a Web Worker that pre-fetches imports, dispatches native calls, and streams `print()` output back. Build the WASM yourself with `cargo wasm` (output around 390 KB unstripped; optionally `wasm-opt -Oz` to shrink).
77
+
The runtime spawns a Web Worker that pre-fetches imports, dispatches native calls, and streams `print()` output back.
0 commit comments