Skip to content

Commit 115dd7a

Browse files
Erik Schillingroypat
authored andcommitted
Fail build on non 64-bit targets
As discussed on Slack and during sync meetings, we should make it explicit that we only support 64bit. While other architectures may be viable to support, currently we assume that usize == u64 and nobody expressed interest in 32bit support. Signed-off-by: Erik Schilling <[email protected]>
1 parent c1b23a2 commit 115dd7a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Added
66
### Changed
7+
- [[#275](https://github.com/rust-vmm/vm-memory/pull/275)] Fail builds on non 64-bit platforms.
78
### Fixed
89
### Removed
910
### Deprecated

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
#![deny(missing_docs)]
2121
#![deny(missing_debug_implementations)]
2222

23+
// We only support 64bit. Fail build when attempting to build other targets
24+
#[cfg(not(target_pointer_width = "64"))]
25+
compile_error!("vm-memory only supports 64-bit targets!");
26+
2327
#[macro_use]
2428
pub mod address;
2529
pub use address::{Address, AddressValue};

0 commit comments

Comments
 (0)