veloren_server_agent/
lib.rs

1#![feature(let_chains)]
2
3#[cfg(all(feature = "be-dyn-lib", feature = "use-dyn-lib"))]
4compile_error!("Can't use both \"be-dyn-lib\" and \"use-dyn-lib\" features at once");
5
6pub mod action_nodes;
7pub mod attack;
8pub mod consts;
9pub mod data;
10pub mod util;
11
12#[cfg(feature = "use-dyn-lib")]
13use {common_dynlib::LoadedLib, lazy_static::lazy_static, std::sync::Arc, std::sync::Mutex};
14
15#[cfg(feature = "use-dyn-lib")]
16lazy_static! {
17    pub static ref LIB: Arc<Mutex<Option<LoadedLib>>> =
18        common_dynlib::init("veloren-server-agent", "agent", &[]);
19}
20
21#[cfg(feature = "use-dyn-lib")]
22pub fn init() { lazy_static::initialize(&LIB); }