Select the types of activity you want to include in your feed.
Document why editors/zed still has Rust.
Explain that Zed Install Dev Extension always cargo-builds a Rust guest, so src/glint.rs is temporary; pure Gleam remains the target via the wasm fork.
···89899090**Zed** (dev extension in this repo — see also [`editors/zed/README.md`](editors/zed/README.md)):
91919292+#### Why is there Rust under `editors/zed/`?
9393+9494+Not because we want the extension authored in Rust. **Zed forces it today.**
9595+9696+On **Install Dev Extension**, when `extension.toml` has `[lib] kind = "Rust"`
9797+(the only allowed kind), Zed always runs roughly:
9898+9999+```text
100100+cargo build --target wasm32-wasip2
101101+```
102102+103103+and writes `extension.wasm` from that crate. There is **no** install path that
104104+only loads a prebuilt component from `gleam export zed-extension`. Without
105105+`Cargo.toml` + `src/*.rs` you get `failed to compile Rust extension`.
106106+107107+So `editors/zed/src/glint.rs` is a **thin temporary guest** (same behaviour as
108108+`zed_glint.gleam`: resolve `glint`, start LSP). Direction of travel is pure
109109+Gleam via our [wasm fork](https://tangled.org/nandi.uk/gleam); the `.rs` crate
110110+can go once Zed accepts prebuilt guests (or we use another install path).
111111+112112+| Path | Role |
113113+|------|------|
114114+| `editors/zed/src/glint.rs` | What Zed can compile and install **now** |
115115+| `editors/zed/src/zed_glint.gleam` | Target authoring surface (pure Gleam) |
116116+| [nandi.uk/gleam](https://tangled.org/nandi.uk/gleam) `wasm` | Compiler that builds a real `zed:extension` component |
117117+92118### 1. Build the glint binary
9311994120```sh
···33Zed extension for Glint — language config, tree-sitter highlighting (via
44tree-sitter-gleam), and the glint language server.
5566+## Why is there Rust code here?
77+88+Not because we want the extension authored in Rust. **Zed forces it today.**
99+1010+On **Install Dev Extension**, when `extension.toml` has:
1111+1212+```toml
1313+[lib]
1414+kind = "Rust"
1515+```
1616+1717+(`"Rust"` is the only allowed `kind`.) Zed always runs roughly:
1818+1919+```text
2020+cargo build --target wasm32-wasip2
2121+```
2222+2323+and writes `extension.wasm` from that crate. There is **no** install path that
2424+only loads a prebuilt Wasm from `gleam export zed-extension`.
2525+2626+Without `Cargo.toml` + `src/*.rs` you get:
2727+2828+- `failed to compile Rust extension` (no Cargo.toml), or
2929+- invalid `kind` if you try anything other than `"Rust"`.
3030+3131+So `src/glint.rs` is a **thin temporary guest** that implements the same idea
3232+as `src/zed_glint.gleam` (resolve `glint` on PATH / fallback, start the LSP).
3333+It is a **host/toolchain constraint**, not the product direction.
3434+3535+| Path | Role |
3636+|------|------|
3737+| `src/glint.rs` | What Zed can compile and install **now** |
3838+| `src/zed_glint.gleam` | Target authoring surface (pure Gleam) |
3939+| [nandi.uk/gleam](https://tangled.org/nandi.uk/gleam) (`wasm` branch) | Compiler that builds a real `zed:extension` component |
4040+4141+Once Zed accepts a prebuilt component (or we stop using Install Dev’s cargo
4242+path), the `.rs` crate can go away and the Gleam export path can own the guest.
4343+644## Compile
745846### Glint binary (LSP)
···1250nix build # → result/bin/glint
1351```
14521515-### Zed guest (Rust — what Install Dev Extension builds)
1616-1717-Zed always runs `cargo build --target wasm32-wasip2` when
1818-`[lib] kind = "Rust"`. Local check:
5353+### Zed guest (Rust — required for Install Dev Extension today)
19542055```sh
2156cd /home/nandi/code/glint/editors/zed
···4277```
43784479See `docs/compiler/wasm-zed-extensions.md` in that repo. Until Zed can load a
4545-prebuilt guest without cargo, **Install Dev Extension still uses the Rust
4646-crate** (`src/glint.rs`). `src/zed_glint.gleam` is the pure-Gleam sketch.
8080+prebuilt guest without cargo, **Install Dev Extension still overwrites with the
8181+Rust build**.
47824883## Install in Zed
4984···80115| Path | Role |
81116|------|------|
82117| `extension.toml` | Zed manifest |
8383-| `src/glint.rs` | Installable guest (`zed_extension_api`) |
118118+| `src/glint.rs` | Temporary installable guest (Zed cargo path) |
84119| `src/zed_glint.gleam` | Pure-Gleam authoring sketch |
85120| `languages/glint/` | Tree-sitter queries + language config |
86121| `extension.wasm` | Built component (Zed / cargo) |