diff --git a/boa_engine/src/lib.rs b/boa_engine/src/lib.rs index 28b9678baa7..6a3d6bcbded 100644 --- a/boa_engine/src/lib.rs +++ b/boa_engine/src/lib.rs @@ -125,6 +125,9 @@ clippy::missing_panics_doc, )] +#[cfg(not(target_has_atomic = "ptr"))] +compile_error!("Boa requires a lock free `AtomicUsize` in order to work properly."); + extern crate static_assertions as sa; pub mod bigint; diff --git a/boa_engine/src/symbol.rs b/boa_engine/src/symbol.rs index 137ba9babde..472b1bf7fdd 100644 --- a/boa_engine/src/symbol.rs +++ b/boa_engine/src/symbol.rs @@ -33,11 +33,12 @@ use num_enum::{IntoPrimitive, TryFromPrimitive}; use std::{ hash::{Hash, Hasher}, - sync::{atomic::Ordering, Arc}, + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc, + }, }; -use portable_atomic::AtomicUsize; - /// Reserved number of symbols. /// /// This is where the well known symbol live