diff --git a/crates/byondapi-rs/Cargo.toml b/crates/byondapi-rs/Cargo.toml index c0fae0d..019f6b4 100644 --- a/crates/byondapi-rs/Cargo.toml +++ b/crates/byondapi-rs/Cargo.toml @@ -26,3 +26,4 @@ byond-515-1621 = [ "byondapi-sys/byond-515-1621", ] byond-516-1651 = ["byondapi-sys/byond-516-1651"] +opendream = ["byondapi-sys/opendream"] diff --git a/crates/byondapi-sys/Cargo.toml b/crates/byondapi-sys/Cargo.toml index da6460c..c1aab10 100644 --- a/crates/byondapi-sys/Cargo.toml +++ b/crates/byondapi-sys/Cargo.toml @@ -27,3 +27,4 @@ doxygen-rs = "0.4" default = ["byond-516-1651"] byond-515-1621 = [] byond-516-1651 = [] +opendream = [] diff --git a/crates/byondapi-sys/src/lib.rs b/crates/byondapi-sys/src/lib.rs index ca6fbe8..176eee0 100644 --- a/crates/byondapi-sys/src/lib.rs +++ b/crates/byondapi-sys/src/lib.rs @@ -7,13 +7,16 @@ )] use std::ops::Deref; -#[cfg(not(target_pointer_width = "32"))] +#[cfg(all(not(target_pointer_width = "32"), not(feature = "opendream")))] compile_error!("BYOND API only functions with 32-bit targets"); -#[cfg(not(target_arch = "x86"))] +#[cfg(all(not(target_arch = "x86"), not(feature = "opendream")))] compile_error!("BYOND API only functions on x86 targets"); -#[cfg(not(any(target_os = "linux", target_os = "windows")))] +#[cfg(all( + not(any(target_os = "linux", target_os = "windows")), + not(feature = "opendream") +))] compile_error!("BYOND API only supports Windows and Linux"); // Include byondapi-c bindings (generated by build.rs)