Skip to content

Commit d524c6d

Browse files
committed
Merge #442: Explicitly do not support 16 bit architectures
d02c313 Explicitly do not support 16 bit architectures (Tobin C. Harding) Pull request description: 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. ACKs for top commit: apoelstra: ACK d02c313 Tree-SHA512: 11466e173913c5337f9a4ea03a4df5ee6be809ca32987494881d470c87a41f9cca77dde7ed68289896cce5cc875b89ab34a164ea2f4dc41b9fbe6e0ab9a62e71
2 parents d589fe9 + d02c313 commit d524c6d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib.rs

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

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

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

0 commit comments

Comments
 (0)