Skip to content

Commit aec86fd

Browse files
claudecdecker
authored andcommitted
signerproxy: Upgrade dependencies and remove async from entry points (Phase 3 & 4)
Phase 3 - Upgrade dependencies to modern versions: - tokio: 0.2 -> 1.x with minimal features (rt, net, io-util only) - tonic: 0.3 -> 0.8 (matches workspace) - prost: 0.6 -> 0.11 (matches workspace) - tonic-build: 0.3 -> 0.8 (matches workspace) - tower: 0.3 -> 0.4 (matches workspace) Phase 4 - Remove async from entry points: - lib.rs: Remove async from Proxy::run() - signerproxy.rs: Remove #[tokio::main] and async from main() The subdaemon now uses only std threading with a minimal tokio runtime exclusively for gRPC operations. No more old tokio 0.2 dependency and no async/await except where required by tonic.
1 parent a8128eb commit aec86fd

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

libs/gl-signerproxy/Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ name = "gl-signerproxy"
1515
path = "src/bin/signerproxy.rs"
1616

1717
[build-dependencies]
18-
tonic-build = "0.3"
18+
tonic-build = "0.8"
1919

2020
[dependencies]
2121
anyhow = { workspace = true }
2222
env_logger = { workspace = true }
23-
tokio = { version = "0.2", features = ["full"] }
24-
tonic = { version = "0.3", features = ["tls", "transport"] }
25-
prost = "0.6"
26-
log = "0.4"
27-
tower = "0.3"
23+
# Minimal tokio - only for gRPC client runtime
24+
tokio = { version = "1", features = ["rt", "net", "io-util"] }
25+
tonic = { version = "0.8", features = ["tls", "transport"] }
26+
prost = "0.11"
27+
log = "*"
28+
tower = "0.4"
2829
which = "4.4.2"
2930
libc = "0.2"
3031
byteorder = "1.5.0"
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
use anyhow::Result;
22
use gl_signerproxy::Proxy;
33

4-
#[tokio::main]
5-
async fn main() -> Result<()> {
4+
fn main() -> Result<()> {
65
env_logger::builder()
76
.target(env_logger::Target::Stderr)
87
.init();
98

10-
Proxy::new().run().await
9+
Proxy::new().run()
1110
}

libs/gl-signerproxy/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ impl Proxy {
1212
Proxy {}
1313
}
1414

15-
pub async fn run(&self) -> Result<()> {
16-
hsmproxy::run().await
15+
pub fn run(&self) -> Result<()> {
16+
hsmproxy::run()
1717
}
1818
}

0 commit comments

Comments
 (0)