diff --git a/Cargo.lock b/Cargo.lock index 4ba0b3e04ac47e074b751033e210ddd2ed3f9bd7..2faee6057d273e1b83d39c4e245f7f31a98c9fde 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20695,7 +20695,6 @@ dependencies = [ "cargo_metadata", "cargo_toml", "clap", - "extension", "gh-workflow", "indexmap", "indoc", diff --git a/crates/extension/src/extension_builder.rs b/crates/extension/src/extension_builder.rs index 252c8f00b4481747266d5a08ec21be91f00ce40b..6d7c3206e8811c88781348946b07fd0f81dd5c3b 100644 --- a/crates/extension/src/extension_builder.rs +++ b/crates/extension/src/extension_builder.rs @@ -19,7 +19,7 @@ use wasm_encoder::{ComponentSectionId, Encode as _, RawSection, Section as _}; use wasmparser::Parser; /// Currently, we compile with Rust's `wasm32-wasip2` target, which works with WASI `preview2` and the component model. -pub const RUST_TARGET: &str = "wasm32-wasip2"; +const RUST_TARGET: &str = "wasm32-wasip2"; /// Compiling Tree-sitter parsers from C to WASM requires Clang 17, and a WASM build of libc /// and clang's runtime library. The `wasi-sdk` provides these binaries. diff --git a/tooling/xtask/Cargo.toml b/tooling/xtask/Cargo.toml index 8f775b44038fc2dcc14ee451066a49742c873da8..13179b2eb69ba9a63ba6be5784907b78bba1b9f2 100644 --- a/tooling/xtask/Cargo.toml +++ b/tooling/xtask/Cargo.toml @@ -14,7 +14,6 @@ backtrace.workspace = true cargo_metadata.workspace = true cargo_toml.workspace = true clap = { workspace = true, features = ["derive"] } -extension.workspace = true toml.workspace = true indoc.workspace = true indexmap.workspace = true diff --git a/tooling/xtask/src/tasks/workflows/extension_tests.rs b/tooling/xtask/src/tasks/workflows/extension_tests.rs index 5c419fc358c5a592776d64daf9480e39c435139e..3e48b238b499223f6cced370421fc235589f9a41 100644 --- a/tooling/xtask/src/tasks/workflows/extension_tests.rs +++ b/tooling/xtask/src/tasks/workflows/extension_tests.rs @@ -10,6 +10,9 @@ use crate::tasks::workflows::{ pub(crate) const ZED_EXTENSION_CLI_SHA: &str = "7cfce605704d41ca247e3f84804bf323f6c6caaf"; +// This should follow the set target in crates/extension/src/extension_builder.rs +const EXTENSION_RUST_TARGET: &str = "wasm32-wasip2"; + // This is used by various extensions repos in the zed-extensions org to run automated tests. pub(crate) fn extension_tests() -> Workflow { let should_check_rust = PathCondition::new("check_rust", r"^(Cargo.lock|Cargo.toml|.*\.rs)$"); @@ -33,10 +36,7 @@ pub(crate) fn extension_tests() -> Workflow { .add_env(("CARGO_INCREMENTAL", 0)) .add_env(("ZED_EXTENSION_CLI_SHA", ZED_EXTENSION_CLI_SHA)) .add_env(("RUSTUP_TOOLCHAIN", "stable")) - .add_env(( - "CARGO_BUILD_TARGET", - extension::extension_builder::RUST_TARGET, - )) + .add_env(("CARGO_BUILD_TARGET", EXTENSION_RUST_TARGET)) .map(|workflow| { jobs.into_iter() .chain([tests_pass]) @@ -47,10 +47,7 @@ pub(crate) fn extension_tests() -> Workflow { } fn install_rust_target() -> Step { - named::bash(format!( - "rustup target add {rust_target}", - rust_target = extension::extension_builder::RUST_TARGET - )) + named::bash(format!("rustup target add {EXTENSION_RUST_TARGET}",)) } fn run_clippy() -> Step {