From 882e2b7392f7be21b04dbd1ce732c5cf9b112d63 Mon Sep 17 00:00:00 2001 From: JongKyung Lee Date: Sun, 23 Aug 2026 17:19:06 +0900 Subject: [PATCH] refactor(js-runtime): drop unused async-trait from JsRuntimeProvider The trait has no async methods, so the attribute generated nothing. Remove it and the async-trait dependency from vp_js_runtime. --- Cargo.lock | 1 - crates/vp_js_runtime/Cargo.toml | 1 - crates/vp_js_runtime/src/provider.rs | 2 -- crates/vp_js_runtime/src/providers/node.rs | 2 -- 4 files changed, 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 01ab26bcc4..64c899f39f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8576,7 +8576,6 @@ dependencies = [ name = "vp_js_runtime" version = "0.0.0" dependencies = [ - "async-trait", "backon", "flate2", "futures-util", diff --git a/crates/vp_js_runtime/Cargo.toml b/crates/vp_js_runtime/Cargo.toml index 1df02ba474..41b82e5cec 100644 --- a/crates/vp_js_runtime/Cargo.toml +++ b/crates/vp_js_runtime/Cargo.toml @@ -8,7 +8,6 @@ publish = false rust-version.workspace = true [dependencies] -async-trait = { workspace = true } backon = { workspace = true } flate2 = { workspace = true } futures-util = { workspace = true } diff --git a/crates/vp_js_runtime/src/provider.rs b/crates/vp_js_runtime/src/provider.rs index bb2c9a5cac..fc8e02bcc4 100644 --- a/crates/vp_js_runtime/src/provider.rs +++ b/crates/vp_js_runtime/src/provider.rs @@ -3,7 +3,6 @@ //! This module defines the trait that all runtime providers (Node, Bun, Deno) //! must implement, along with types for describing download information. -use async_trait::async_trait; use vt_str::Str; use crate::{Error, Platform}; @@ -77,7 +76,6 @@ pub struct DownloadInfo { /// /// Each runtime (Node.js, Bun, Deno) implements this trait to provide /// runtime-specific logic for downloading and installing. -#[async_trait] pub trait JsRuntimeProvider: Send + Sync { /// Get the name of this runtime (e.g., "node", "bun", "deno") fn name(&self) -> &'static str; diff --git a/crates/vp_js_runtime/src/providers/node.rs b/crates/vp_js_runtime/src/providers/node.rs index dc38b3b9e3..abb97890ba 100644 --- a/crates/vp_js_runtime/src/providers/node.rs +++ b/crates/vp_js_runtime/src/providers/node.rs @@ -2,7 +2,6 @@ use std::time::{SystemTime, UNIX_EPOCH}; -use async_trait::async_trait; use node_semver::{Range, Version}; use serde::{Deserialize, Serialize}; use vt_path::{AbsolutePath, AbsolutePathBuf}; @@ -590,7 +589,6 @@ fn is_official_dist_host(base_url: &str) -> bool { host.eq_ignore_ascii_case("nodejs.org") } -#[async_trait] impl JsRuntimeProvider for NodeProvider { fn name(&self) -> &'static str { "node"