Import prelude types explicitly from alloc
diff --git a/src/cxx_string.rs b/src/cxx_string.rs
index 5780e3e..2c712f1 100644
--- a/src/cxx_string.rs
+++ b/src/cxx_string.rs
@@ -1,4 +1,5 @@
use alloc::borrow::Cow;
+use alloc::string::String;
use core::fmt::{self, Debug, Display};
use core::slice;
use core::str::{self, Utf8Error};
diff --git a/src/exception.rs b/src/exception.rs
index e85bf61..0ffca66 100644
--- a/src/exception.rs
+++ b/src/exception.rs
@@ -1,3 +1,4 @@
+use alloc::boxed::Box;
use core::fmt::{self, Debug, Display};
/// Exception thrown from an `extern "C"` function.
diff --git a/src/lib.rs b/src/lib.rs
index fd623e8..028800b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -348,6 +348,7 @@
//!
//! [https://github.com/dtolnay/cxx]: https://github.com/dtolnay/cxx
+#![no_std]
#![doc(html_root_url = "https://docs.rs/cxx/0.4.4")]
#![deny(improper_ctypes)]
#![allow(non_camel_case_types)]
@@ -371,6 +372,7 @@
extern crate link_cplusplus;
extern crate alloc;
+extern crate std;
#[macro_use]
mod macros;
diff --git a/src/result.rs b/src/result.rs
index 8b4bb75..296d4a2 100644
--- a/src/result.rs
+++ b/src/result.rs
@@ -1,5 +1,7 @@
use crate::exception::Exception;
use crate::rust_str::RustStr;
+use alloc::boxed::Box;
+use alloc::string::{String, ToString};
use core::fmt::Display;
use core::ptr;
use core::result::Result as StdResult;
diff --git a/src/rust_string.rs b/src/rust_string.rs
index d10714b..a5fa3f4 100644
--- a/src/rust_string.rs
+++ b/src/rust_string.rs
@@ -1,3 +1,4 @@
+use alloc::string::String;
use core::mem;
#[repr(C)]
diff --git a/src/rust_vec.rs b/src/rust_vec.rs
index 3ae5d5e..f1a7741 100644
--- a/src/rust_vec.rs
+++ b/src/rust_vec.rs
@@ -1,4 +1,6 @@
use crate::rust_string::RustString;
+use alloc::string::String;
+use alloc::vec::Vec;
use core::mem::ManuallyDrop;
#[repr(C)]
diff --git a/src/symbols/exception.rs b/src/symbols/exception.rs
index 7449f14..da1c3f9 100644
--- a/src/symbols/exception.rs
+++ b/src/symbols/exception.rs
@@ -1,3 +1,5 @@
+use alloc::boxed::Box;
+use alloc::string::String;
use core::slice;
#[export_name = "cxxbridge04$exception"]
diff --git a/src/symbols/rust_string.rs b/src/symbols/rust_string.rs
index 67c53e1..774b824 100644
--- a/src/symbols/rust_string.rs
+++ b/src/symbols/rust_string.rs
@@ -1,3 +1,5 @@
+use alloc::borrow::ToOwned;
+use alloc::string::String;
use core::mem::{ManuallyDrop, MaybeUninit};
use core::ptr;
use core::slice;
diff --git a/src/symbols/rust_vec.rs b/src/symbols/rust_vec.rs
index 667296f..2304abf 100644
--- a/src/symbols/rust_vec.rs
+++ b/src/symbols/rust_vec.rs
@@ -1,5 +1,6 @@
use crate::rust_string::RustString;
use crate::rust_vec::RustVec;
+use alloc::vec::Vec;
use core::mem;
use core::ptr;