Skip to content

Commit

Permalink
Disable debug symbols and add LTO, update version and reduce logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
daemontus committed Feb 23, 2021
1 parent ab76936 commit 2dd272d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "biodivine-aeon-server"
version = "0.1.2"
version = "0.1.2-edition.2019.1"
authors = ["Samuel Pastva <[email protected]>"]
edition = "2018"

Expand All @@ -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" }
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ impl AeonSession {
}

pub fn handle_bridge_request(web_view: &mut WebView<ArcComputation>, 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();
Expand All @@ -125,7 +126,6 @@ pub fn handle_bridge_request(web_view: &mut WebView<ArcComputation>, 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,
Expand Down Expand Up @@ -161,7 +161,7 @@ pub fn handle_bridge_request(web_view: &mut WebView<ArcComputation>, 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)
}
}
Expand Down

0 comments on commit 2dd272d

Please sign in to comment.