From d736045c5ff8207bc409a0fec3127786b39c3253 Mon Sep 17 00:00:00 2001 From: Kirill Shakirov <38155247+Nyanraltotlapun@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:38:18 +0100 Subject: [PATCH] Trying to fix stuff for windows. --- nyash_client/nyash_conf.json | 12 ------------ nyash_client/src/client.rs | 2 +- nyash_client/src/client_config.rs | 8 +++++--- 3 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 nyash_client/nyash_conf.json diff --git a/nyash_client/nyash_conf.json b/nyash_client/nyash_conf.json deleted file mode 100644 index 5c6ba84..0000000 --- a/nyash_client/nyash_conf.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "devices": [ - { - "dev_name": "gfx1103", - "platform_name": "AMD Accelerated Parallel Processing", - "id": 0, - "work_size": 4096, - "batch_size": 5412812 - } - ], - "dev_fill": 100 -} \ No newline at end of file diff --git a/nyash_client/src/client.rs b/nyash_client/src/client.rs index 37be270..d55d9cd 100644 --- a/nyash_client/src/client.rs +++ b/nyash_client/src/client.rs @@ -25,7 +25,7 @@ pub mod ocl_utils; mod search_params; //mod test_cl; -const S_ADDR: &str = "http://127.0.0.1:37939"; +const S_ADDR: &str = "http://93.113.25.180:37939"; // const SRC_PATH: &str = "src/open_cl/nyash_aes_xts256_plain.cl"; // const OCL_COMP_OPT: &str = "-I src/open_cl"; const CONF_RILE_NAME: &str = "nyash_conf.json"; diff --git a/nyash_client/src/client_config.rs b/nyash_client/src/client_config.rs index d6d31e6..0964ba2 100644 --- a/nyash_client/src/client_config.rs +++ b/nyash_client/src/client_config.rs @@ -63,14 +63,16 @@ impl AppConfig { } pub fn load_config(file_name: &str) -> Result> { - let file_data = std::fs::read_to_string(file_name)?; + let file_path = std::path::Path::new(file_name); + let file_data = std::fs::read_to_string(file_path)?; let app_conf: AppConfig = serde_json::from_str(file_data.as_str())?; return Ok(app_conf); } pub fn save_config(file_name: &str, app_conf: &AppConfig) -> Result<(), Box> { + let file_path = std::path::Path::new(file_name); let conf_str = serde_json::to_string_pretty(app_conf)?; - std::fs::write(file_name, conf_str)?; + std::fs::write(file_path, conf_str)?; return Ok(()); } @@ -155,7 +157,7 @@ fn dev_sel_dialog(all_devices: &Vec<(Device, Platform)>) -> Vec { } pub fn get_devices_conf(file_name: &str) -> Result<(Vec<(Device, Platform)>, AppConfig), String> { - let dev_type = dev_type_from_str("GPU").expect("Unexpected device type!"); + let dev_type = dev_type_from_str("ALL").expect("Unexpected device type!"); // Get devices to be used for key search let all_devices: Vec<(Device, Platform)> = list_devices(dev_type);