From a046d9002345918bc39dd53c8b13885b2db84263 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Sat, 12 Oct 2024 02:25:46 -0500 Subject: replace main.rs demo with integration tests TODO unit and docs tests --- impls/monero.rs/src/lib.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'impls/monero.rs/src/lib.rs') diff --git a/impls/monero.rs/src/lib.rs b/impls/monero.rs/src/lib.rs index 7c21c9d..c9b1d81 100644 --- a/impls/monero.rs/src/lib.rs +++ b/impls/monero.rs/src/lib.rs @@ -6,6 +6,17 @@ use std::sync::Arc; use libloading::{Library, Symbol}; +#[cfg(target_os = "android")] +const LIB_NAME: &str = "libmonero_libwallet2_api_c.so"; +#[cfg(target_os = "ios")] +const LIB_NAME: &str = "MoneroWallet.framework/MoneroWallet"; +#[cfg(target_os = "linux")] +const LIB_NAME: &str = "monero_libwallet2_api_c.so"; +#[cfg(target_os = "macos")] +const LIB_NAME: &str = "monero_libwallet2_api_c.dylib"; +#[cfg(target_os = "windows")] +const LIB_NAME: &str = "monero_libwallet2_api_c.dll"; + pub mod network { use std::os::raw::c_int; pub const MAINNET: c_int = 0; @@ -28,17 +39,6 @@ pub struct WalletManager { library: Library, } -#[cfg(target_os = "android")] -const LIB_NAME: &str = "libmonero_libwallet2_api_c.so"; -#[cfg(target_os = "ios")] -const LIB_NAME: &str = "MoneroWallet.framework/MoneroWallet"; -#[cfg(target_os = "linux")] -const LIB_NAME: &str = "monero_libwallet2_api_c.so"; -#[cfg(target_os = "macos")] -const LIB_NAME: &str = "monero_libwallet2_api_c.dylib"; -#[cfg(target_os = "windows")] -const LIB_NAME: &str = "monero_libwallet2_api_c.dll"; - impl WalletManager { /// Creates a new `WalletManager`, loading the Monero wallet library (`wallet2_api_c`). pub fn new(lib_path: Option<&str>) -> WalletResult> { -- cgit v1.2.3