diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fadaa00..58772f3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Added ### Changed +- [[#275](https://github.com/rust-vmm/vm-memory/pull/275)] Fail builds on non 64-bit platforms. ### Fixed ### Removed ### Deprecated diff --git a/src/lib.rs b/src/lib.rs index 6688b1d6..a9342235 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,6 +20,10 @@ #![deny(missing_docs)] #![deny(missing_debug_implementations)] +// We only support 64bit. Fail build when attempting to build other targets +#[cfg(not(target_pointer_width = "64"))] +compile_error!("vm-memory only supports 64-bit targets!"); + #[macro_use] pub mod address; pub use address::{Address, AddressValue};