change hardcoded file to tempdir

This commit is contained in:
mfahampshire
2025-03-06 17:37:19 +01:00
parent 3cb3ebd79b
commit d45d1eb313
3 changed files with 4 additions and 1 deletions
Generated
+1
View File
@@ -6536,6 +6536,7 @@ dependencies = [
"reqwest 0.12.4",
"serde",
"tap",
"tempfile",
"thiserror 2.0.12",
"tokio",
"tokio-stream",
+1
View File
@@ -58,6 +58,7 @@ tap = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }
toml = { workspace = true }
tempfile = { workspace = true }
# tcpproxy dependencies
clap = { workspace = true, features = ["derive"] }
+2 -1
View File
@@ -3,13 +3,14 @@ use nym_sdk::mixnet::{
StoragePaths,
};
use std::path::PathBuf;
use tempfile::TempDir;
#[tokio::main]
async fn main() {
nym_bin_common::logging::setup_logging();
// Specify some config options
let config_dir = PathBuf::from("/tmp/surb-example");
let config_dir: PathBuf = TempDir::new().unwrap().path().to_path_buf();
let storage_paths = StoragePaths::new_from_dir(&config_dir).unwrap();
// Create the client with a storage backend, and enable it by giving it some paths. If keys