From 2dd272d0795c7104298bf6ce52b685f2f2a2dbe6 Mon Sep 17 00:00:00 2001 From: Samuel Pastva Date: Tue, 23 Feb 2021 13:01:10 +0100 Subject: [PATCH] Disable debug symbols and add LTO, update version and reduce logging. --- Cargo.toml | 6 +++--- src/lib.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d4bc0a6..e74b35d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "biodivine-aeon-server" -version = "0.1.2" +version = "0.1.2-edition.2019.1" authors = ["Samuel Pastva "] edition = "2018" @@ -10,9 +10,9 @@ rustdoc-args = ["--html-in-header", "docs-head.html"] [profile.release] # This is important for profiling - otherwise we would get unreadable traces. -debug = true +#debug = true # This gives a marginally better runtime, but a much much longer compile times, so disabled by default. -#lto = true +lto = true [dependencies] web-view = { git = "https://github.com/daemontus/web-view.git", branch = "master" } diff --git a/src/lib.rs b/src/lib.rs index 915fb03..553e9e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -105,7 +105,8 @@ impl AeonSession { } pub fn handle_bridge_request(web_view: &mut WebView, arg: &str) -> WVResult { - println!("Request: {}", arg); + // TODO: This print should be enabled/disabled based on some env. property. + //println!("Request: {}", arg); match json::parse(arg) { Ok(json) => { let id: u64 = json["requestId"].as_u64().unwrap(); @@ -125,7 +126,6 @@ pub fn handle_bridge_request(web_view: &mut WebView, arg: &str) tfd::message_box_ok("Aeon", &message, icon); Ok(()) } else if path == "confirm" { - println!("Confirm"); let message: &str = json["message"].as_str().unwrap(); let result = match tfd::message_box_yes_no("Aeon", message, MessageBoxIcon::Warning, YesNo::No) { YesNo::No => false, @@ -161,7 +161,7 @@ pub fn handle_bridge_request(web_view: &mut WebView, arg: &str) process_request(web_view.user_data().clone(), path, &json).json(); response["requestId"] = id.into(); let command = format!("NativeBridge.handleResponse({})", json::stringify(response)); - println!("Command: {}", command); + //println!("Command: {}", command); web_view.eval(&command) } }