diff --git a/Cargo.toml b/Cargo.toml index 8dea5efc..190b006d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ "tox", "tox_binary_io", diff --git a/tox/src/lib.rs b/tox/src/lib.rs index 13912f1b..b39b0253 100644 --- a/tox/src/lib.rs +++ b/tox/src/lib.rs @@ -4,3 +4,16 @@ pub use tox_core as core; pub use tox_crypto as crypto; pub use tox_encryptsave as encryptsave; pub use tox_packet as packet; + +pub fn crate_version() -> String { + env!("CARGO_PKG_VERSION").to_string() +} +pub fn crate_version_major() -> u32 { + env!("CARGO_PKG_VERSION_MAJOR").parse().expect("Invalid major version") +} +pub fn crate_version_minor() -> u32 { + env!("CARGO_PKG_VERSION_MINOR").parse().expect("Invalid minor version") +} +pub fn crate_version_patch() -> u32 { + env!("CARGO_PKG_VERSION_PATCH").parse().expect("Invalid patch version") +} diff --git a/tox_core/Cargo.toml b/tox_core/Cargo.toml index 877ea177..231a2941 100644 --- a/tox_core/Cargo.toml +++ b/tox_core/Cargo.toml @@ -39,7 +39,7 @@ crypto_box = "0.8" [dependencies.tokio] version = "1.28" default-features = false -features = ["net", "sync", "time"] +features = ["net", "rt", "rt-multi-thread", "sync", "time"] [dependencies.tokio-util] version = "0.7"