Edge Python is a sandboxed subset of Python. The compiler and the virtual machine are written in Rust. You write ordinary Python syntax. The compiler turns it into bytecode, and a stack VM runs it.
The same engine ships in two forms:
- A WebAssembly binary of about 200 KB that runs in the browser.
- A native engine built into the
edgecommand line interface.
Sandboxed means the defaults deny everything. A program gets no file system, no network, and no environment access unless the host grants it. Imports resolve at compile time through a resolver the host injects, so a running program never loads code you did not declare.
Every runnable example in these docs executes in the real runtime. Try editing this one:
the -> 3
quick -> 5
brown -> 5
fox -> 3What it is not
Edge Python is not a full Python. It leaves out what does not fit a small sandboxed runtime:
- No bundled standard library. Every module is an external package. See Modules.
- No dynamic code.
exec,eval,compile, and__import__do not exist. - No metaclasses, no descriptor protocol, no
__slots__. - No
complexnumbers. - A fixed set of builtins and nothing more.
diris not one of them. See Builtins.
The language guide covers everything that is supported.
Where to go next
- Quickstart installs the CLI and runs your first program.
- Syntax walks through the language feature by feature.
- Builtins and Methods list the fixed builtin set.
- Design explains how the compiler and VM work.
Machine learning models can load skill/SKILL.md from the repository for a self-verifying summary of the language and CLI.
For questions or integration help, email [email protected].