aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorWill Dillon <william@housedillon.com>2025-12-04 17:07:12 +0000
committerWill Dillon <william@housedillon.com>2025-12-04 17:07:12 +0000
commitbf21ebaaae44b267cfefc87eee9608c09aab96b7 (patch)
tree67234092d3c85a9c58d1fa9ca51337ac480ebfb7 /src/lib.rs
parentBetter than 90% everywhere. (diff)
downloadmeshcore-rs-bf21ebaaae44b267cfefc87eee9608c09aab96b7.tar.gz
meshcore-rs-bf21ebaaae44b267cfefc87eee9608c09aab96b7.zip
Getting closer to no-std being done
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index dfd777f..621dcf4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,23 @@
+#![cfg_attr(not(feature = "std"), no_std)]
+
pub mod crypto;
-pub mod identity;
+pub mod string_helper;
+
+#[derive(Debug, PartialEq)]
+pub enum MeshcoreStringError {
+ StringLengthError,
+ StringUnicodeError,
+ StringEncrypted,
+}
+
+// This version of identity is pretty specific
+// to the std version of this library.
+#[cfg(feature = "std")]
+pub mod std_identity;
+
+// This version of identity is no-std
+#[cfg(not(feature = "std"))]
+pub(crate) mod no_std_identity;
pub mod packet;
pub mod packet_content;