From 4661f1a8c32f38c45343de70490cd454fbee36e7 Mon Sep 17 00:00:00 2001 From: wan9chi Date: Mon, 12 Oct 2026 11:26:16 +0800 Subject: [PATCH] refactor: rename fspy_ipc_str to vt_ipc_str `IpcStr` is the string type of the IPC between `vp` and the tools it runs (vt_ipc_shared, vt_client, vt_server), which runs on every platform. The `fspy_` prefix suggested it was part of file-access tracking. Only its `fspy_nostd` feature, enabled by fspy_shared, is. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 32 +++++++++---------- Cargo.toml | 2 +- crates/fspy_shared/Cargo.toml | 2 +- crates/fspy_shared/src/ipc/ipc_path.rs | 2 +- crates/fspy_shared/src/ipc/mod.rs | 2 +- crates/vt_client/Cargo.toml | 2 +- crates/vt_client/src/lib.rs | 2 +- crates/vt_ipc_shared/Cargo.toml | 2 +- crates/vt_ipc_shared/src/lib.rs | 2 +- .../{fspy_ipc_str => vt_ipc_str}/Cargo.toml | 2 +- crates/{fspy_ipc_str => vt_ipc_str}/README.md | 4 +-- .../{fspy_ipc_str => vt_ipc_str}/src/lib.rs | 0 crates/vt_server/Cargo.toml | 2 +- crates/vt_server/src/lib.rs | 2 +- crates/vt_server/tests/integration.rs | 2 +- 15 files changed, 30 insertions(+), 30 deletions(-) rename crates/{fspy_ipc_str => vt_ipc_str}/Cargo.toml (97%) rename crates/{fspy_ipc_str => vt_ipc_str}/README.md (97%) rename crates/{fspy_ipc_str => vt_ipc_str}/src/lib.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index ea866f6dc..1e213a895 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1437,18 +1437,6 @@ dependencies = [ "toml", ] -[[package]] -name = "fspy_ipc_str" -version = "0.0.0" -dependencies = [ - "allocator-api2", - "bumpalo", - "bytemuck", - "fspy_nostd", - "fspy_nostd_alloc", - "wincode", -] - [[package]] name = "fspy_nostd" version = "0.0.0" @@ -1536,7 +1524,6 @@ dependencies = [ "bumpalo", "bytemuck", "ctor", - "fspy_ipc_str", "fspy_nostd", "fspy_nostd_alloc", "fspy_shm", @@ -1546,6 +1533,7 @@ dependencies = [ "thiserror 2.0.18", "tokio", "uuid", + "vt_ipc_str", "vt_path", "winapi", "wincode", @@ -5133,11 +5121,11 @@ dependencies = [ name = "vt_client" version = "0.0.0" dependencies = [ - "fspy_ipc_str", "rustc-hash", "socket_ipc", "vt_casefold", "vt_ipc_shared", + "vt_ipc_str", "vt_path", "wincode", ] @@ -5198,8 +5186,20 @@ dependencies = [ name = "vt_ipc_shared" version = "0.0.0" dependencies = [ - "fspy_ipc_str", "rustc-hash", + "vt_ipc_str", + "wincode", +] + +[[package]] +name = "vt_ipc_str" +version = "0.0.0" +dependencies = [ + "allocator-api2", + "bumpalo", + "bytemuck", + "fspy_nostd", + "fspy_nostd_alloc", "wincode", ] @@ -5303,7 +5303,6 @@ dependencies = [ name = "vt_server" version = "0.0.0" dependencies = [ - "fspy_ipc_str", "futures", "rustc-hash", "socket_ipc", @@ -5315,6 +5314,7 @@ dependencies = [ "vt_client", "vt_glob", "vt_ipc_shared", + "vt_ipc_str", "vt_path", "wincode", ] diff --git a/Cargo.toml b/Cargo.toml index cfb40df9a..39890d20a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -102,7 +102,6 @@ monostate = "1.0.2" napi = "3" napi-build = "2" napi-derive = "3" -fspy_ipc_str = { path = "crates/fspy_ipc_str" } nix = "0.31.2" ntapi = "0.4.1" nucleo-matcher = "0.3.1" @@ -182,6 +181,7 @@ vt_client = { path = "crates/vt_client" } vt_client_napi = { path = "crates/vt_client_napi", artifact = "cdylib" } vt_graph = { path = "crates/vt_graph" } vt_ipc_shared = { path = "crates/vt_ipc_shared" } +vt_ipc_str = { path = "crates/vt_ipc_str" } vt_plan = { path = "crates/vt_plan" } vt_server = { path = "crates/vt_server" } vt_workspace = { path = "crates/vt_workspace" } diff --git a/crates/fspy_shared/Cargo.toml b/crates/fspy_shared/Cargo.toml index 12e2dfacb..d304f79fa 100644 --- a/crates/fspy_shared/Cargo.toml +++ b/crates/fspy_shared/Cargo.toml @@ -15,9 +15,9 @@ bytemuck = { workspace = true, features = ["must_cast", "derive"] } fspy_nostd = { workspace = true } fspy_nostd_alloc = { workspace = true } fspy_shm = { workspace = true } -fspy_ipc_str = { workspace = true, features = ["fspy_nostd"] } thiserror = { workspace = true } uuid = { workspace = true, features = ["v4"] } +vt_ipc_str = { workspace = true, features = ["fspy_nostd"] } vt_path = { workspace = true } [target.'cfg(target_os = "windows")'.dependencies] diff --git a/crates/fspy_shared/src/ipc/ipc_path.rs b/crates/fspy_shared/src/ipc/ipc_path.rs index db04f18b7..8906db243 100644 --- a/crates/fspy_shared/src/ipc/ipc_path.rs +++ b/crates/fspy_shared/src/ipc/ipc_path.rs @@ -10,7 +10,7 @@ use std::{ use bumpalo::Bump; use bytemuck::TransparentWrapper; -use fspy_ipc_str::IpcStr; +use vt_ipc_str::IpcStr; use wincode::{ SchemaRead, SchemaWrite, config::Config, diff --git a/crates/fspy_shared/src/ipc/mod.rs b/crates/fspy_shared/src/ipc/mod.rs index 5064cb26a..7e90a4333 100644 --- a/crates/fspy_shared/src/ipc/mod.rs +++ b/crates/fspy_shared/src/ipc/mod.rs @@ -3,8 +3,8 @@ mod ipc_path; use std::fmt::Debug; use bitflags::bitflags; -pub use fspy_ipc_str::IpcStr; pub use ipc_path::IpcPath; +pub use vt_ipc_str::IpcStr; use wincode::{SchemaRead, SchemaWrite}; #[derive(SchemaWrite, SchemaRead, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)] diff --git a/crates/vt_client/Cargo.toml b/crates/vt_client/Cargo.toml index 875b64686..900b9948e 100644 --- a/crates/vt_client/Cargo.toml +++ b/crates/vt_client/Cargo.toml @@ -7,12 +7,12 @@ publish = false rust-version.workspace = true [dependencies] -fspy_ipc_str = { workspace = true } rustc-hash = { workspace = true } socket_ipc = { workspace = true } vt_casefold = { workspace = true } vt_path = { workspace = true } vt_ipc_shared = { workspace = true } +vt_ipc_str = { workspace = true } wincode = { workspace = true, features = ["derive"] } [lints] diff --git a/crates/vt_client/src/lib.rs b/crates/vt_client/src/lib.rs index b9aa185a3..fc6d847e1 100644 --- a/crates/vt_client/src/lib.rs +++ b/crates/vt_client/src/lib.rs @@ -5,13 +5,13 @@ use std::{ sync::Arc, }; -use fspy_ipc_str::IpcStr; use rustc_hash::FxHashMap; use socket_ipc::Client as Stream; use vt_casefold::EnvName; use vt_ipc_shared::{ EnvQuery as IpcEnvQuery, GetEnvResponse, GetEnvsResponse, IPC_ENV_NAME, Request, }; +use vt_ipc_str::IpcStr; use vt_path::{self, AbsolutePath}; use wincode::{SchemaRead, config::DefaultConfig}; diff --git a/crates/vt_ipc_shared/Cargo.toml b/crates/vt_ipc_shared/Cargo.toml index 1647f0baf..080dd6336 100644 --- a/crates/vt_ipc_shared/Cargo.toml +++ b/crates/vt_ipc_shared/Cargo.toml @@ -7,8 +7,8 @@ publish = false rust-version.workspace = true [dependencies] -fspy_ipc_str = { workspace = true } rustc-hash = { workspace = true } +vt_ipc_str = { workspace = true } wincode = { workspace = true, features = ["derive"] } [lints] diff --git a/crates/vt_ipc_shared/src/lib.rs b/crates/vt_ipc_shared/src/lib.rs index fb041c629..ab1501078 100644 --- a/crates/vt_ipc_shared/src/lib.rs +++ b/crates/vt_ipc_shared/src/lib.rs @@ -1,5 +1,5 @@ -use fspy_ipc_str::IpcStr; use rustc_hash::FxHashMap; +use vt_ipc_str::IpcStr; use wincode::{SchemaRead, SchemaWrite}; pub const IPC_ENV_NAME: &str = "VP_RUN_IPC_NAME"; diff --git a/crates/fspy_ipc_str/Cargo.toml b/crates/vt_ipc_str/Cargo.toml similarity index 97% rename from crates/fspy_ipc_str/Cargo.toml rename to crates/vt_ipc_str/Cargo.toml index 2f4103556..e190b8deb 100644 --- a/crates/fspy_ipc_str/Cargo.toml +++ b/crates/vt_ipc_str/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "fspy_ipc_str" +name = "vt_ipc_str" version = "0.0.0" edition.workspace = true license.workspace = true diff --git a/crates/fspy_ipc_str/README.md b/crates/vt_ipc_str/README.md similarity index 97% rename from crates/fspy_ipc_str/README.md rename to crates/vt_ipc_str/README.md index 76628cf5f..cc1ccc7c6 100644 --- a/crates/fspy_ipc_str/README.md +++ b/crates/vt_ipc_str/README.md @@ -1,4 +1,4 @@ -# fspy_ipc_str +# vt_ipc_str A platform-native string type for lossless, zero-copy IPC. @@ -20,7 +20,7 @@ This type is designed for same-platform IPC (e.g., shared memory between a paren ## Usage ```rust -use fspy_ipc_str::IpcStr; +use vt_ipc_str::IpcStr; // Unix: construct from bytes #[cfg(unix)] diff --git a/crates/fspy_ipc_str/src/lib.rs b/crates/vt_ipc_str/src/lib.rs similarity index 100% rename from crates/fspy_ipc_str/src/lib.rs rename to crates/vt_ipc_str/src/lib.rs diff --git a/crates/vt_server/Cargo.toml b/crates/vt_server/Cargo.toml index 729e853b2..9ea41f072 100644 --- a/crates/vt_server/Cargo.toml +++ b/crates/vt_server/Cargo.toml @@ -8,7 +8,6 @@ rust-version.workspace = true [dependencies] futures = { workspace = true } -fspy_ipc_str = { workspace = true } rustc-hash = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["io-util", "rt", "macros"] } @@ -19,6 +18,7 @@ vt_casefold = { workspace = true } vt_glob = { workspace = true } vt_path = { workspace = true } vt_ipc_shared = { workspace = true } +vt_ipc_str = { workspace = true } wincode = { workspace = true, features = ["derive"] } [dev-dependencies] diff --git a/crates/vt_server/src/lib.rs b/crates/vt_server/src/lib.rs index f74c83daf..0a83c2a69 100644 --- a/crates/vt_server/src/lib.rs +++ b/crates/vt_server/src/lib.rs @@ -5,7 +5,6 @@ use std::{ sync::Arc, }; -use fspy_ipc_str::IpcStr; use futures::{FutureExt, StreamExt, future::LocalBoxFuture, stream::FuturesUnordered}; use rustc_hash::{FxHashMap, FxHashSet}; use socket_ipc::{Server as TransportServer, ServerConnection as Stream}; @@ -15,6 +14,7 @@ use vt_casefold::EnvName; use vt_ipc_shared::{ EnvQuery as IpcEnvQuery, GetEnvResponse, GetEnvsResponse, IPC_ENV_NAME, Request, }; +use vt_ipc_str::IpcStr; use vt_path::AbsolutePath; use wincode::{SchemaWrite, config::DefaultConfig}; diff --git a/crates/vt_server/tests/integration.rs b/crates/vt_server/tests/integration.rs index 171c527db..3986d0f5e 100644 --- a/crates/vt_server/tests/integration.rs +++ b/crates/vt_server/tests/integration.rs @@ -5,13 +5,13 @@ use std::{ thread, }; -use fspy_ipc_str::IpcStr; use rustc_hash::FxHashMap; use socket_ipc::Client as RawStream; use tokio::runtime::Builder; use vt_casefold::EnvName; use vt_client::{Client, GetEnvsQuery}; use vt_ipc_shared::{EnvQuery as RawEnvQuery, GetEnvResponse, Request}; +use vt_ipc_str::IpcStr; use vt_server::{EnvQuery, Error, Recorder, Reports, ServerHandle, serve}; fn env_map(pairs: &[(&str, &str)]) -> FxHashMap>, Arc> {