1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#![allow(non_camel_case_types, non_upper_case_globals)]
use lazy_static::lazy_static;
mod consts;
mod types;
mod functions {
include!(concat!(env!("OUT_DIR"), "/functions.rs"));
}
pub use consts::*;
pub use functions::*;
pub use types::*;
lazy_static! {
static ref LIB_RESULT: Result<libloading::Library, libloading::Error> =
unsafe { libloading::Library::new(JACK_LIB) };
}
pub fn library() -> Result<&'static libloading::Library, impl std::error::Error> {
LIB_RESULT.as_ref()
}