veilid/veilid-core/src/lib.rs

66 lines
1.5 KiB
Rust
Raw Normal View History

2021-12-08 03:09:45 +00:00
#![deny(clippy::all)]
2021-12-09 21:11:52 +00:00
#![deny(unused_must_use)]
2022-06-27 01:12:16 +00:00
#[cfg(all(feature = "rt-async-std", feature = "rt-tokio"))]
compile_error!(
"feature \"rt-async-std\" and feature \"rt-tokio\" cannot be enabled at the same time"
);
2021-11-22 16:28:30 +00:00
#[macro_use]
extern crate alloc;
2022-06-08 01:31:05 +00:00
mod api_tracing_layer;
2021-11-22 16:28:30 +00:00
mod attachment_manager;
mod callback_state_machine;
2022-02-07 02:18:42 +00:00
mod core_context;
2021-11-22 16:28:30 +00:00
mod dht;
mod intf;
mod network_manager;
mod receipt_manager;
mod routing_table;
mod rpc_processor;
mod veilid_api;
mod veilid_config;
mod veilid_rng;
#[macro_use]
pub mod xx;
2022-06-08 01:31:05 +00:00
pub use self::api_tracing_layer::ApiTracingLayer;
2021-11-22 16:28:30 +00:00
pub use self::attachment_manager::AttachmentState;
2022-02-09 14:47:36 +00:00
pub use self::core_context::{api_startup, api_startup_json, UpdateCallback};
2021-11-22 16:28:30 +00:00
pub use self::veilid_api::*;
pub use self::veilid_config::*;
pub mod veilid_capnp {
include!(concat!(env!("OUT_DIR"), "/proto/veilid_capnp.rs"));
}
pub mod tests;
2022-01-28 03:02:16 +00:00
pub fn veilid_version_string() -> String {
env!("CARGO_PKG_VERSION").to_owned()
}
pub fn veilid_version() -> (u32, u32, u32) {
(
u32::from_str(env!("CARGO_PKG_VERSION_MAJOR")).unwrap(),
u32::from_str(env!("CARGO_PKG_VERSION_MINOR")).unwrap(),
u32::from_str(env!("CARGO_PKG_VERSION_PATCH")).unwrap(),
)
}
2022-02-01 03:47:17 +00:00
2022-03-04 01:45:39 +00:00
#[cfg(target_os = "android")]
pub use intf::utils::android::{veilid_core_setup_android, veilid_core_setup_android_no_log};
2022-05-17 20:55:53 +00:00
pub static DEFAULT_LOG_IGNORE_LIST: [&str; 10] = [
2022-02-01 03:47:17 +00:00
"async_std",
"async_io",
"polling",
"rustls",
"async_tungstenite",
"tungstenite",
"netlink_proto",
"netlink_sys",
2022-05-17 20:55:53 +00:00
"trust_dns_resolver",
"trust_dns_proto",
2022-02-01 03:47:17 +00:00
];