summaryrefslogtreecommitdiff
path: root/impls/monero.rs/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'impls/monero.rs/src/lib.rs')
-rw-r--r--impls/monero.rs/src/lib.rs22
1 files changed, 11 insertions, 11 deletions
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<Arc<Self>> {