Skip to content

Commit 8db83de

Browse files
docs: Clean redundancy in docs and typos.
1 parent 47cd96c commit 8db83de

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

docs/pages/getting-started/what-it-is.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Reads like Python (parses Python syntax). Runs differently, what it executes is
3030
These parse for syntactic compatibility but raise at runtime, or simply don't exist:
3131

3232
- **Standard library**: no bundled stdlib; every module is external (see **Modules** above).
33-
- **I/O**: `input()` reads from a host-provided buffer. There is no file system, no network, no `os`, no `sys`, those surface only when the host runtime registers them as [host packages](/reference/writing-modules#path-c-host-capability) (the same mechanism behind `print` and `input` themselves).
34-
- **Async surface**: `async def` creates real coroutines and the VM runs a cooperative scheduler, but there is no `asyncio` module; primitives are top-level builtins (`run`, `sleep`, `gather`, `with_timeout`, `cancel`, `receive`). Coroutines do not expose `.send()` / `.throw()` / `.close()`.
33+
- **I/O**: `input()` reads from a host-provided buffer. There is no file system, no network, no `os`, no `sys`, those surface only when the host runtime registers them as [host capabilities](/reference/writing-modules#path-b-host-capability) (the same mechanism behind `print` and `input` themselves).
34+
- **Async surface**: `async def` creates real coroutines and the VM runs a cooperative scheduler, but there is no `asyncio` moduleprimitives are top-level builtins ([Async](/language/async)). Coroutines do not expose `.send()` / `.throw()` / `.close()`.
3535
- **Metaclasses, descriptor protocol, `__slots__`**: not modeled.
3636
- **Dynamic code**: no `exec`, no `eval`, no `compile`, no `__import__` (use the `import_module(name)` builtin to look up an already-imported module by alias).
3737
- **Reflection beyond `type`, `id`, `hash`, `repr`, `callable`, `getattr`, `hasattr`, `vars`, `globals`, `locals`, `isinstance`, `issubclass`**. `dir` is absent.
@@ -60,5 +60,5 @@ Single `.wasm` artifact (`compiler_lib.wasm`, 170 KB), runs anywhere WebAssembly
6060

6161
Two ABIs sit on top:
6262

63-
- **`Compiler <-> host` imports**, embedder-declared, covering output, module fetching, native dispatch, wall-clock time. Custom embedders that ship [host packages](/reference/writing-modules#path-c-host-capability) declare additional imports (DOM, FS) without touching the plugin ABI.
63+
- **`Compiler <-> host` imports**, embedder-declared, covering output, module fetching, native dispatch, wall-clock time. Custom embedders that ship [host capabilities](/reference/writing-modules#path-b-host-capability) declare additional imports (DOM, FS) without touching the plugin ABI.
6464
- **Plugin ABI (sealed v1)**, contract for CDN-distributed `.wasm` plugin modules. Exactly 6 `env.*` imports, never extended. See the [WASM module ABI](/reference/wasm-abi).

docs/pages/reference/builtins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ hello world
4747

4848
### abs
4949

50-
`abs(x)`: absolute value of int or float. Non-numeric -> `TypeError`. Works on inline and `LongInt` i128; literals beyond +/-2^127 are rejected at parse time.
50+
`abs(x)`: absolute value of int or float. Non-numeric -> `TypeError`. Works across the full integer range (see [Integer width](/reference/limits-and-errors#integer-width)).
5151

5252
```python
5353
print(abs(-7))

docs/pages/reference/limits-and-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Raised as `VmErr`; most catchable with `try` / `except`.
122122
| `Attribute` | `AttributeError` | Attribute not found on object |
123123
| `Name` | `NameError` | Undefined name |
124124
| `ZeroDiv` | `ZeroDivisionError` | Division or modulo by zero |
125-
| `Overflow` | `OverflowError` | Integer arithmetic past +/-2^47 |
125+
| `Overflow` | `OverflowError` | Integer arithmetic past ±2^127 |
126126
| `Raised("KeyError")` | `KeyError` | Dict / set lookup miss |
127127
| `Raised("IndexError")` | `IndexError` | Sequence index out of range |
128128
| `Raised("StopIteration")` | `StopIteration` | Iterator exhausted |

docs/pages/reference/wasm-abi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "WASM module ABI"
33
description: "The wire format a `.wasm` module must follow to be importable by Edge Python."
44
---
55

6-
> **Sealed contract, plugin ABI v1.** Every signature, op code, tag, and error kind here is the public contract for CDN-distributed `.wasm` plugin modules (Path A). New host packages arrive as new `Op` values, never new imports; a future wire-level break would ship as `env_v2.*` without removing v1. Distinct from the `compiler<->host` interface embedders declare (see [host packages](/reference/writing-modules#path-c-host-capability)), embedders aren't bound by the 6-import limit here.
6+
> **Sealed contract, plugin ABI v1.** Every signature, op code, tag, and error kind here is the public contract for CDN-distributed `.wasm` plugin modules (Path A). New host packages arrive as new `Op` values, never new imports; a future wire-level break would ship as `env_v2.*` without removing v1. Distinct from the `compiler<->host` interface embedders declare (see [host capabilities](/reference/writing-modules#path-b-host-capability)), embedders aren't bound by the 6-import limit here.
77
88
A `.wasm` module imported via `from "<url>" import <names>` follows the contract below. Handle-based API: the host owns all values, the guest sees only opaque `u32` handles, and one universal dispatch primitive (`edge_op`) covers every operation. New types, methods, and language features become available to existing modules with no ABI change.
99

docs/pages/reference/writing-modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Edge Python has no bundled stdlib. Three ways to add native functionality:
99
|---|---|---|---|
1010
| **`.wasm` module via URL** ([WASM ABI](/reference/wasm-abi)) | Publish `.wasm` to a CDN; any host loads dynamically | Primitives only (None, bool, i128, f64, bytes/str) | Reference [`wasm-pdk`](https://github.com/dylan-sutton-chavez/edge-python/tree/main/wasm-pdk) (Rust), community PDKs, or hand-written wire boilerplate |
1111
| **Host capability** | Custom `compiler.wasm` (additional host imports declared) + host runtime they bridge to | Primitives + access to host services (DOM, FS, fetch) through embedder host imports | You own embedder + host runtime; bindings travel together |
12-
| **JS host module** | Plain ESM registered via `createWorker({ mainThreadModules })` | Primitives only (same as Path A) | Pure JS; no Rust, no `.wasm`, no build step |
12+
| **JS host module** | Plain ESM via `createWorker` (`mainThreadModules` eager, `hostModules` lazy) or the `host` field of `packages.json` | Primitives only (same as Path A) | Pure JS; no Rust, no `.wasm`, no build step |
1313

1414
`.wasm` matches the marketplace pattern (`from "https://x.wasm" import f` works in any host). Host capability is for runtime distributions that own their `compiler.wasm` and expose host services to scripts (the same pattern `print` and `input` use). JS host modules keep upstream `compiler_lib.wasm` untouched while exposing main-thread surface (DOM, dialogs, FileReader, observers, anything `window.*`).
1515

0 commit comments

Comments
 (0)