[refactor] Refactor project into proper rust workspace.
This commit is contained in:
14
Cargo.toml
14
Cargo.toml
@@ -7,6 +7,12 @@ members = [
|
||||
]
|
||||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
edition = "2024"
|
||||
version = "0.1.0"
|
||||
license = "MIT"
|
||||
rust-version = "1.89"
|
||||
|
||||
# Optional: Keep dependency versions consistent across members
|
||||
[workspace.dependencies]
|
||||
thiserror = "1.0.69"
|
||||
@@ -26,6 +32,14 @@ cliclack = "0.3.6"
|
||||
clap_complete = "4.5.57"
|
||||
clap_mangen = "0.2.29"
|
||||
|
||||
# Additional shared deps used across members
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
|
||||
reqwest = { version = "0.12.7", default-features = false, features = ["blocking", "rustls-tls", "gzip", "json"] }
|
||||
hex = "0.4.3"
|
||||
tempfile = "3.12.0"
|
||||
assert_cmd = "2.0.16"
|
||||
|
||||
[workspace.lints.rust]
|
||||
unused_imports = "deny"
|
||||
dead_code = "warn"
|
||||
|
16
build.rs
16
build.rs
@@ -1,16 +0,0 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2025 <COPYRIGHT HOLDER>. All rights reserved.
|
||||
|
||||
fn main() {
|
||||
// Only run special build steps when gpu-vulkan feature is enabled.
|
||||
let vulkan_enabled = std::env::var("CARGO_FEATURE_GPU_VULKAN").is_ok();
|
||||
if !vulkan_enabled {
|
||||
return;
|
||||
}
|
||||
// Placeholder: In a full implementation, we would invoke CMake for whisper.cpp with GGML_VULKAN=1.
|
||||
// For now, emit a helpful note. Build will proceed; runtime Vulkan backend returns an explanatory error.
|
||||
println!("cargo:rerun-if-changed=extern/whisper.cpp");
|
||||
println!(
|
||||
"cargo:warning=Building with gpu-vulkan: ensure Vulkan SDK/loader are installed. Future versions will compile whisper.cpp via CMake."
|
||||
);
|
||||
}
|
@@ -1,24 +1,24 @@
|
||||
[package]
|
||||
name = "polyscribe-cli"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "polyscribe"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.99"
|
||||
clap = { version = "4.5.44", features = ["derive"] }
|
||||
clap_complete = "4.5.57"
|
||||
clap_mangen = "0.2.29"
|
||||
directories = "5.0.1"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.142"
|
||||
tokio = { version = "1.47.1", features = ["rt-multi-thread", "macros", "process", "fs"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
|
||||
which = "6.0.3"
|
||||
anyhow = { workspace = true }
|
||||
clap = { workspace = true, features = ["derive"] }
|
||||
clap_complete = { workspace = true }
|
||||
clap_mangen = { workspace = true }
|
||||
directories = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "process", "fs"] }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true, features = ["fmt", "env-filter"] }
|
||||
which = { workspace = true }
|
||||
|
||||
polyscribe-core = { path = "../polyscribe-core" }
|
||||
polyscribe-host = { path = "../polyscribe-host" }
|
||||
@@ -29,4 +29,4 @@ polyscribe-protocol = { path = "../polyscribe-protocol" }
|
||||
default = []
|
||||
|
||||
[dev-dependencies]
|
||||
assert_cmd = "2.0.16"
|
||||
assert_cmd = { workspace = true }
|
||||
|
@@ -1,22 +1,22 @@
|
||||
[package]
|
||||
name = "polyscribe-core"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.99"
|
||||
thiserror = "1.0.69"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.142"
|
||||
toml = "0.8.23"
|
||||
directories = "5.0.1"
|
||||
chrono = "0.4.41"
|
||||
libc = "0.2.175"
|
||||
whisper-rs = "0.14.3"
|
||||
anyhow = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
directories = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
whisper-rs = { workspace = true }
|
||||
# UI and progress
|
||||
cliclack = { workspace = true }
|
||||
# New: HTTP downloads + hashing
|
||||
reqwest = { version = "0.12.7", default-features = false, features = ["blocking", "rustls-tls", "gzip", "json"] }
|
||||
sha2 = "0.10.8"
|
||||
hex = "0.4.3"
|
||||
tempfile = "3.12.0"
|
||||
# HTTP downloads + hashing
|
||||
reqwest = { workspace = true }
|
||||
sha2 = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
|
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "polyscribe-host"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.99"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.142"
|
||||
tokio = { version = "1.47.1", features = ["rt-multi-thread", "process", "io-util"] }
|
||||
which = "6.0.3"
|
||||
anyhow = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt-multi-thread", "process", "io-util"] }
|
||||
which = { workspace = true }
|
||||
directories = { workspace = true }
|
||||
|
@@ -1,8 +1,8 @@
|
||||
[package]
|
||||
name = "polyscribe-protocol"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.142"
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
|
Reference in New Issue
Block a user