feat: add Zed extension release artifact with WSL2 support
All checks were successful
Continuous Integration / Build Package (push) Successful in 30s
Continuous Integration / Lint, Check & Test (push) Successful in 1m9s
Release / Build and Release (push) Successful in 7m10s

The Zed extension now detects Windows via current_platform() and
automatically uses `wsl streamd lsp` instead of `streamd lsp`,
enabling seamless LSP support when Zed runs on Windows with streamd
installed in WSL2.

A pre-built zip (extension.toml + extension.wasm) is now built as
`zed-extension-zip` and published to every release. The README gains
a step-by-step WSL2 installation guide.
This commit is contained in:
Konstantin Fickel 2026-04-19 21:16:04 +02:00
parent ec978590c0
commit 82adb655f1
Signed by: kfickel
GPG key ID: A793722F9933C1A5
3 changed files with 55 additions and 6 deletions

View file

@ -1,4 +1,4 @@
use zed_extension_api::{self as zed, Command, LanguageServerId, Result, Worktree};
use zed_extension_api::{self as zed, Command, LanguageServerId, Os, Result, Worktree, current_platform};
struct StreamdExtension;
@ -12,11 +12,20 @@ impl zed::Extension for StreamdExtension {
_language_server_id: &LanguageServerId,
_worktree: &Worktree,
) -> Result<Command> {
Ok(Command {
command: "streamd".into(),
args: vec!["lsp".into()],
env: vec![],
})
let (os, _) = current_platform();
if os == Os::Windows {
Ok(Command {
command: "wsl".into(),
args: vec!["streamd".into(), "lsp".into()],
env: vec![],
})
} else {
Ok(Command {
command: "streamd".into(),
args: vec!["lsp".into()],
env: vec![],
})
}
}
}