Skip to content

Commit 995f342

Browse files
committed
Explicitly do not support 16 bit architectures
We cast `u32` to `usize` in a bunch of places, this will cause strange behaviour because of truncation on 16 bit architectures. Add a compile time check to explicitly not support 16 bit architectures.
1 parent d589fe9 commit 995f342

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@
9090
#![deny(unused_imports)]
9191
#![deny(missing_docs)]
9292

93+
#[cfg(target_pointer_width = "16")]
94+
compile_error!("rust-miniscript currently only supports architectures with pointers wider than 16 bits");
95+
9396
pub use bitcoin;
9497

9598
#[cfg(not(feature = "std"))]

0 commit comments

Comments
 (0)