fix(monero-sys): Allow opt-level to be max (linker opt issue)

This commit is contained in:
Binarybaron 2025-06-25 20:19:29 +02:00
parent 83db0785ee
commit 320110c36e
2 changed files with 12 additions and 4 deletions

View file

@ -2,9 +2,6 @@
resolver = "2"
members = ["electrum-pool", "monero-rpc", "monero-rpc-pool", "monero-sys", "src-tauri", "swap"]
[profile.release]
opt-level = 0
[patch.crates-io]
# patch until new release https://github.com/thomaseizinger/rust-jsonrpc-client/pull/51
jsonrpc_client = { git = "https://github.com/delta1/rust-jsonrpc-client.git", rev = "3b6081697cd616c952acb9c2f02d546357d35506" }

View file

@ -282,7 +282,7 @@ namespace monero_rust_log
}
// Call the rust function to forward the log message.
forward_cpp_log(
monero_rust_log::forward_cpp_log(
span_name.c_str(),
level,
m->file().length() > 0 ? m->file() : "",
@ -339,3 +339,14 @@ namespace monero_rust_log
installed = false;
}
} // namespace
#include <map>
#include <vector>
#include <string>
// The following is a hack to ensure the linker includes the pair destructor in the binary
using String = std::string;
using StringMap = std::map<String, String>;
using StringVec = std::vector<String>;
static std::pair<StringMap, StringVec> _monero_sys_pair_instantiation;