From 7541190a43b7cfd5a154740414337b53df2d39b3 Mon Sep 17 00:00:00 2001 From: Julian Freeman Date: Mon, 1 Dec 2025 07:24:35 -0400 Subject: [PATCH] little modification --- package.json | 2 +- src-tauri/Cargo.lock | 26 +++++++++++++------------- src-tauri/Cargo.toml | 6 +++--- src-tauri/src/lib.rs | 8 +------- src-tauri/src/main.rs | 2 +- src-tauri/tauri.conf.json | 10 +++++----- 6 files changed, 24 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 568fcb3..9d2a33f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "rest-client", + "name": "lite-request", "private": true, "version": "0.1.0", "type": "module", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index d30ba44..36fb826 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2,6 +2,19 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "LiteRequest" +version = "0.1.0" +dependencies = [ + "reqwest", + "serde", + "serde_json", + "tauri", + "tauri-build", + "tauri-plugin-opener", + "tokio", +] + [[package]] name = "adler2" version = "2.0.1" @@ -3129,19 +3142,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "rest-client" -version = "0.1.0" -dependencies = [ - "reqwest", - "serde", - "serde_json", - "tauri", - "tauri-build", - "tauri-plugin-opener", - "tokio", -] - [[package]] name = "ring" version = "0.17.14" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 2284155..31da65c 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "rest-client" +name = "LiteRequest" version = "0.1.0" -description = "A Tauri App" +description = "A Simple REST API Client" authors = ["you"] edition = "2021" @@ -11,7 +11,7 @@ edition = "2021" # The `_lib` suffix may seem redundant but it is necessary # to make the lib name unique and wouldn't conflict with the bin name. # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 -name = "rest_client_lib" +name = "lite_request_lib" crate-type = ["staticlib", "cdylib", "rlib"] [build-dependencies] diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index eb3e1aa..90e8fef 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -10,12 +10,6 @@ struct HttpResponse { time_elapsed: u128, // milliseconds } -// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ -#[tauri::command] -fn greet(name: &str) -> String { - format!("Hello, {}! You've been greeted from Rust!", name) -} - #[tauri::command] async fn execute_request( method: String, @@ -79,7 +73,7 @@ async fn execute_request( pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_opener::init()) - .invoke_handler(tauri::generate_handler![greet, execute_request]) + .invoke_handler(tauri::generate_handler![execute_request]) .run(tauri::generate_context!()) .expect("error while running tauri application"); } \ No newline at end of file diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index d41f891..887a56d 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -2,5 +2,5 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] fn main() { - rest_client_lib::run() + lite_request_lib::run() } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 1100ed7..95f7730 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,8 +1,8 @@ { "$schema": "https://schema.tauri.app/config/2", - "productName": "rest-client", + "productName": "LiteRequest", "version": "0.1.0", - "identifier": "top.volan.rest-client", + "identifier": "top.volan.LiteRequest", "build": { "beforeDevCommand": "pnpm dev", "devUrl": "http://localhost:1420", @@ -12,9 +12,9 @@ "app": { "windows": [ { - "title": "rest-client", - "width": 800, - "height": 600 + "title": "LiteRequest", + "width": 1200, + "height": 800 } ], "security": {