From 87e7ebcf1b64e12074e2ba4a315e05fc2e18ba87 Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Wed, 5 Jun 2019 13:59:44 +0000 Subject: [PATCH] prevent compilation on 16-bit targets so we can use `usize` and assume it is 32 bits --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 4e7409ba..f407738b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,6 +54,9 @@ extern crate secp256k1; #[cfg(all(test, feature = "unstable"))] extern crate test; #[cfg(feature="bitcoinconsensus")] extern crate bitcoinconsensus; +#[cfg(target_pointer_width = "16")] +compile_error!("rust-bitcoin cannot be used on 16-bit architectures"); + #[cfg(test)] #[macro_use] mod test_macros;