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
Renames the [lib] to "compiler" so the cdylib output is compiler.wasm,
and updates all references (CI actions, cli build, runtime, demo, docs,
tests) plus the inter-job artifact name compiler_lib_wasm -> compiler_wasm.
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ The runtime spawns a Web Worker that pre-fetches imports, dispatches native call
78
78
79
79
### Consume the release from a Rust host
80
80
81
-
Declare `edge-python` as a dependency and `compiler_lib.wasm` from the matching GitHub Release is fetched into `OUT_DIR` automatically, no manual download.
81
+
Declare `edge-python` as a dependency and `compiler.wasm` from the matching GitHub Release is fetched into `OUT_DIR` automatically, no manual download.
Pin to a tag for reproducible builds; use `branch = "main"` for unreleased changes. Requires `curl` on PATH. Gated by the default-on `prebuilt` feature.
Edge Python is a `cdylib`, your host instantiates `compiler_lib.wasm` and calls its exports. The same `.wasm` you serve to browsers is the server-side artifact; the host owns I/O, fetching, and output (WASI / runtime APIs instead of `fetch` / `postMessage`). No server-side CLI ships here (the `cli/` tool targets the browser runtime), so embed `compiler_lib.wasm` in around 50 LOC wasmtime shell for local dev.
102
+
Edge Python is a `cdylib`, your host instantiates `compiler.wasm` and calls its exports. The same `.wasm` you serve to browsers is the server-side artifact; the host owns I/O, fetching, and output (WASI / runtime APIs instead of `fetch` / `postMessage`). No server-side CLI ships here (the `cli/` tool targets the browser runtime), so embed `compiler.wasm` in around 50 LOC wasmtime shell for local dev.
Copy file name to clipboardExpand all lines: compiler/Cargo.toml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,10 @@ description = "Single-pass SSA compiler and threaded-code VM for a sandboxed Pyt
8
8
readme = "README.md"
9
9
autotests = false
10
10
autobins = false
11
-
links = "compiler_lib"
11
+
links = "compiler"
12
12
13
13
[lib]
14
-
name = "compiler_lib"
14
+
name = "compiler"
15
15
crate-type = ["cdylib", "rlib"]
16
16
test = false
17
17
doctest = false
@@ -20,7 +20,7 @@ doctest = false
20
20
name = "tests"
21
21
path = "tests/main.rs"
22
22
23
-
# `prebuilt` (default on) gates the `build.rs` download of `compiler_lib.wasm`. Consumers get the wasm transparently; this repo's own producer-side commands pass `--no-default-features` to skip the fetch (nothing here reads `DEP_COMPILER_LIB_WASM`).
23
+
# `prebuilt` (default on) gates the `build.rs` download of `compiler.wasm`. Consumers get the wasm transparently; this repo's own producer-side commands pass `--no-default-features` to skip the fetch (nothing here reads `DEP_COMPILER_LIB_WASM`).
`cargo wasm` is a workspace alias (`.cargo/config.toml`) for `cargo build --release --target wasm32-unknown-unknown -p edge-python`. Plain `cargo build --release` produces host artifacts (`.rlib` + cdylib) for embedders linking `compiler_lib`. To add native modules from your own crate, implement the `Resolver` trait, see [Writing modules](https://edgepython.com/reference/writing-modules).
45
+
`cargo wasm` is a workspace alias (`.cargo/config.toml`) for `cargo build --release --target wasm32-unknown-unknown -p edge-python`. Plain `cargo build --release` produces host artifacts (`.rlib` + cdylib) for embedders linking `compiler`. To add native modules from your own crate, implement the `Resolver` trait, see [Writing modules](https://edgepython.com/reference/writing-modules).
46
46
47
47
The host runtime owns I/O, network, and module fetching; there is no native CLI. Browser hosts use the [`runtime/`](../runtime/) JS package; server/edge runtimes use wasmtime, wasmer, Cloudflare Workers, Fastly Compute, Spin.
48
48
49
49
### Consuming the release from another Rust crate
50
50
51
-
This crate declares `links = "compiler_lib"` and its `build.rs` downloads the matching `compiler_lib.wasm` from the GitHub Release for `CARGO_PKG_VERSION` into `OUT_DIR`. Downstream crates read the absolute path through `DEP_COMPILER_LIB_WASM`.
51
+
This crate declares `links = "compiler"` and its `build.rs` downloads the matching `compiler.wasm` from the GitHub Release for `CARGO_PKG_VERSION` into `OUT_DIR`. Downstream crates read the absolute path through `DEP_COMPILER_LIB_WASM`.
URL is derived from `<repository>/releases/download/v<version>/compiler_lib.wasm`, a tag bump is the only retarget needed. Use `branch = "main"` for unreleased work. Requires `curl` on PATH. Gated by the default-on `prebuilt` feature; producer-side commands pass `--no-default-features` to skip.
69
+
URL is derived from `<repository>/releases/download/v<version>/compiler.wasm`, a tag bump is the only retarget needed. Use `branch = "main"` for unreleased work. Requires `curl` on PATH. Gated by the default-on `prebuilt` feature; producer-side commands pass `--no-default-features` to skip.
0 commit comments