Skip to content

Commit 430ff6f

Browse files
committed
refactor: split secrets into koharu-secrets
1 parent 2dd9a65 commit 430ff6f

16 files changed

Lines changed: 313 additions & 295 deletions

File tree

Cargo.lock

Lines changed: 12 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ koharu-ml = { path = "crates/koharu-ml", default-features = false }
3232
koharu-psd = { path = "crates/koharu-psd", default-features = false }
3333
koharu-renderer = { path = "crates/koharu-renderer", default-features = false }
3434
koharu-rpc = { path = "crates/koharu-rpc", default-features = false }
35+
koharu-secrets = { path = "crates/koharu-secrets", default-features = false }
3536

3637
# external dependencies
3738
candle-transformers = "=0.9.2"

crates/koharu-ai/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ base64 = { workspace = true }
2222
clap = { workspace = true }
2323
eventsource-stream = { workspace = true }
2424
futures = { workspace = true }
25+
koharu-secrets = { workspace = true }
2526
koharu-runtime = { workspace = true }
2627
reqwest = { workspace = true }
2728
reqwest-middleware = { workspace = true, features = ["form", "json"] }

crates/koharu-ai/src/codex/token_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use koharu_runtime::SecretStore;
1+
use koharu_secrets::SecretStore;
22

33
use super::error::{CodexError, Result};
44
use super::tokens::CodexTokens;

crates/koharu-app/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ koharu-ml = { workspace = true }
2424
koharu-renderer = { workspace = true }
2525
koharu-llm = { workspace = true }
2626
koharu-runtime = { workspace = true }
27+
koharu-secrets = { workspace = true }
2728
anyhow = { workspace = true }
2829
arc-swap = { workspace = true }
2930
async-trait = { workspace = true }

crates/koharu-app/src/config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ use std::fs;
22

33
use anyhow::{Context, Result};
44
use camino::Utf8PathBuf;
5-
use koharu_runtime::{SecretStore, default_app_data_root};
5+
use koharu_runtime::default_app_data_root;
6+
use koharu_secrets::SecretStore;
67
use serde::{Deserialize, Deserializer, Serialize, Serializer};
78
use utoipa::ToSchema;
89

crates/koharu-runtime/Cargo.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ publish.workspace = true
1313

1414
[dependencies]
1515
anyhow = { workspace = true }
16-
atomicwrites = { workspace = true }
1716
camino = { workspace = true }
1817
koharu-core = { workspace = true }
1918
dirs = { workspace = true }
@@ -22,7 +21,6 @@ hf-hub = { workspace = true }
2221
indexmap = { workspace = true }
2322
indicatif = { workspace = true }
2423
inventory = { workspace = true }
25-
keyring = { workspace = true }
2624
reqwest = { workspace = true }
2725
reqwest-middleware = { workspace = true }
2826
reqwest-retry = { workspace = true }
@@ -38,11 +36,5 @@ tar = "0.4"
3836
[target.'cfg(target_os = "windows")'.dependencies]
3937
windows-sys = { workspace = true }
4038

41-
[target.'cfg(windows)'.dependencies]
42-
keyring = { workspace = true, features = ["windows-native"] }
43-
44-
[target.'cfg(target_os = "macos")'.dependencies]
45-
keyring = { workspace = true, features = ["apple-native"] }
46-
4739
[dev-dependencies]
4840
tempfile = { workspace = true }

crates/koharu-runtime/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ mod llama;
66
mod loader;
77
pub mod packages;
88
mod runtime;
9-
mod secrets;
109
mod zluda;
1110

1211
pub use cuda::{
@@ -21,5 +20,4 @@ pub use runtime::{
2120
ComputePolicy, Runtime, RuntimeHttpClient, RuntimeHttpConfig, RuntimeManager,
2221
default_app_data_root,
2322
};
24-
pub use secrets::{SecretStore, delete_secret, get_secret, set_secret};
2523
pub use zluda::zluda_active;

0 commit comments

Comments
 (0)