dl_api 0.3.0

The easiest, simplest and safest way to load dynamic (shared object) libraries from Rust!
Documentation
// dl_api
//
// Copyright (c) 2018 Jeron A. Lau
// Copyright (c) 2017 Szymon Wieloch
// Distributed under the MIT LICENSE (See accompanying file LICENSE.txt)

//! `dl_api` is a library for dynamically loading API's from .dll/.so/.dylib
//! files.  It's based off of `rust-dlopen`.  A lot of simplifications have
//! been made.
//!
//! It's the easiest, simplest and safest way to load dynamic (shared object) libraries!
//!
//! # Getting Started: Example
//! The code inside of the curly braces for `link!()` matches exactly with code inside of the curly
//! braces for `extern "C"`.  This makes it easy for you to turn your `extern "C"`s into `link!()`s.
//! ```
//! // Shared object: either "libmylibrary.so.1", "mylibrary-1.dll" or "libMyLibrary.dylib"
//! dl_api::link!(MyApi, "libmylibrary.so.1", {
//! 	fn cFunction(param_name: ParamType) -> ReturnType;
//! });
//!
//! fn main() {
//! 	let api = MyApi::new().unwrap(); // unwrap the `Result`.
//!
//! 	let rtn: ReturnType = unsafe {
//! 		(api.cFunction)(0);
//! 	};
//! }
//! ```
//! 

#[macro_use]
extern crate lazy_static;
#[cfg(unix)]
extern crate libc;
#[cfg(windows)]
extern crate winapi;

mod dl_api;
mod error;
mod library;

pub use crate::error::Error;
#[doc(hidden)]
pub use crate::library::Library; // Use in dl_api only.