diff --git a/crates/roc_std/src/lib.rs b/crates/roc_std/src/lib.rs index 7a4953e508..2b5fbd4aa4 100644 --- a/crates/roc_std/src/lib.rs +++ b/crates/roc_std/src/lib.rs @@ -1,5 +1,5 @@ //! Provides Rust representations of Roc data structures. -#![no_std] +#![cfg_attr(not(feature = "std"), no_std)] #![crate_type = "lib"] use arrayvec::ArrayString; diff --git a/crates/roc_std/src/roc_str.rs b/crates/roc_std/src/roc_str.rs index 1fefb2c228..57cfc549a8 100644 --- a/crates/roc_std/src/roc_str.rs +++ b/crates/roc_std/src/roc_str.rs @@ -18,7 +18,7 @@ use core::{ }; #[cfg(feature = "std")] -use core::ffi::{CStr, CString}; +use std::ffi::{CStr, CString}; use crate::RocList;