aboutsummaryrefslogtreecommitdiff
path: root/core/src/lib.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-04-11 10:19:20 +0200
committerhozan23 <hozan23@karyontech.net>2024-05-19 13:51:30 +0200
commit0992071a7f1a36424bcfaf1fbc84541ea041df1a (patch)
tree961d73218af672797d49f899289bef295bc56493 /core/src/lib.rs
parenta69917ecd8272a4946cfd12c75bf8f8c075b0e50 (diff)
add support for tokio & improve net crate api
Diffstat (limited to 'core/src/lib.rs')
-rw-r--r--core/src/lib.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/core/src/lib.rs b/core/src/lib.rs
index ae88188..62052a8 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -1,8 +1,13 @@
+#[cfg(all(feature = "smol", feature = "tokio"))]
+compile_error!("Only one async runtime feature should be enabled");
+
+#[cfg(not(any(feature = "smol", feature = "tokio")))]
+compile_error!("At least one async runtime feature must be enabled for this crate.");
+
/// A set of helper tools and functions.
pub mod util;
-/// A module containing async utilities that work with the
-/// [`smol`](https://github.com/smol-rs/smol) async runtime.
+/// A set of async utilities.
pub mod async_util;
/// Represents karyon's Core Error.
@@ -14,8 +19,12 @@ pub mod event;
/// A simple publish-subscribe system [`Read More`](./pubsub/struct.Publisher.html)
pub mod pubsub;
+/// A cross-compatible async runtime
+pub mod async_runtime;
+
#[cfg(feature = "crypto")]
+
/// Collects common cryptographic tools
pub mod crypto;
-use error::Result;
+pub use error::{Error, Result};