Use alloc for no_std builds
[rust-lightning] / lightning / src / lib.rs
index 3c09f386753040320c27199086790b022944df26..a9f46b43a4026f650069cb97f9baf1dd62a0d968 100644 (file)
@@ -31,6 +31,7 @@
 #![cfg_attr(all(any(test, feature = "_test_utils"), feature = "unstable"), feature(test))]
 #[cfg(all(any(test, feature = "_test_utils"), feature = "unstable"))] extern crate test;
 
+extern crate alloc;
 extern crate bitcoin;
 extern crate core;
 #[cfg(any(test, feature = "_test_utils"))] extern crate hex;
@@ -41,3 +42,7 @@ pub mod util;
 pub mod chain;
 pub mod ln;
 pub mod routing;
+
+mod prelude {
+       pub use alloc::{vec, vec::Vec, string::String};
+}
\ No newline at end of file