From a2a502f026965733e186cc31d65477799358fea3 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 22 Apr 2025 17:07:52 -0400 Subject: [PATCH] zed_extension_api: Release v0.4.0 (#29237) This PR releases v0.4.0 of the Zed extension API. Support for this version of the extension API will land in Zed v0.184.x. Release Notes: - N/A --- crates/extension_api/Cargo.toml | 3 +-- crates/extension_api/README.md | 3 ++- crates/extension_host/src/wasm_host/wit.rs | 4 +--- crates/extension_host/src/wasm_host/wit/since_v0_3_0.rs | 1 - 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/crates/extension_api/Cargo.toml b/crates/extension_api/Cargo.toml index 62397f34596951503112a36da8ef2df6c8ee78b2..c6f676a4a351f8ce9f2d603f2a4cd8af7c757835 100644 --- a/crates/extension_api/Cargo.toml +++ b/crates/extension_api/Cargo.toml @@ -6,8 +6,7 @@ repository = "https://github.com/zed-industries/zed" documentation = "https://docs.rs/zed_extension_api" keywords = ["zed", "extension"] edition.workspace = true -# Change back to `true` when we're ready to publish v0.4.0. -publish = false +publish = true license = "Apache-2.0" [lints] diff --git a/crates/extension_api/README.md b/crates/extension_api/README.md index 756bf0290f1ce9c39796716a04b6472d065589ba..eac507eed10bffb41fae52d24c97a36eb58c2fc1 100644 --- a/crates/extension_api/README.md +++ b/crates/extension_api/README.md @@ -23,7 +23,7 @@ need to set your `crate-type` accordingly: ```toml [dependencies] -zed_extension_api = "0.3.0" +zed_extension_api = "0.4.0" [lib] crate-type = ["cdylib"] @@ -63,6 +63,7 @@ Here is the compatibility of the `zed_extension_api` with versions of Zed: | Zed version | `zed_extension_api` version | | ----------- | --------------------------- | +| `0.184.x` | `0.0.1` - `0.4.0` | | `0.178.x` | `0.0.1` - `0.3.0` | | `0.162.x` | `0.0.1` - `0.2.0` | | `0.149.x` | `0.0.1` - `0.1.0` | diff --git a/crates/extension_host/src/wasm_host/wit.rs b/crates/extension_host/src/wasm_host/wit.rs index 612d99cd8b89ee88bd263db54c76044c1f3e6028..16009ed3c57bce7d0fdc38317f5c6c5897bcb0dc 100644 --- a/crates/extension_host/src/wasm_host/wit.rs +++ b/crates/extension_host/src/wasm_host/wit.rs @@ -60,7 +60,7 @@ pub fn wasm_api_version_range(release_channel: ReleaseChannel) -> RangeInclusive let max_version = match release_channel { ReleaseChannel::Dev | ReleaseChannel::Nightly => latest::MAX_VERSION, - ReleaseChannel::Stable | ReleaseChannel::Preview => since_v0_3_0::MAX_VERSION, + ReleaseChannel::Stable | ReleaseChannel::Preview => latest::MAX_VERSION, }; since_v0_0_1::MIN_VERSION..=max_version @@ -110,8 +110,6 @@ impl Extension { let _ = release_channel; if version >= latest::MIN_VERSION { - authorize_access_to_unreleased_wasm_api_version(release_channel)?; - let extension = latest::Extension::instantiate_async(store, component, latest::linker()) .await diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_3_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_3_0.rs index 9c30c42db0845c25ba113e2d8f2c046d4161a4e7..024c11f5b06231cceb037260e2ebbf1872529897 100644 --- a/crates/extension_host/src/wasm_host/wit/since_v0_3_0.rs +++ b/crates/extension_host/src/wasm_host/wit/since_v0_3_0.rs @@ -8,7 +8,6 @@ use wasmtime::component::{Linker, Resource}; use super::latest; pub const MIN_VERSION: SemanticVersion = SemanticVersion::new(0, 3, 0); -pub const MAX_VERSION: SemanticVersion = SemanticVersion::new(0, 3, 0); wasmtime::component::bindgen!({ async: true,