1#![warn(missing_docs)]
9#![allow(clippy::needless_question_mark)] #![allow(clippy::manual_range_contains)] #![allow(clippy::needless_borrows_for_generic_args)] #![no_std]
14
15#[cfg(target_pointer_width = "16")]
17compile_error!(
18 "rust-bitcoin currently only supports architectures with pointers wider than 16 bits, let us
19 know if you want 16-bit support. Note that we do NOT guarantee that we will implement it!"
20);
21
22#[cfg(feature = "alloc")]
23extern crate alloc;
24
25#[cfg(feature = "std")]
26extern crate std;
27
28#[cfg(feature = "serde")]
30pub extern crate serde;
31
32#[cfg(test)]
33#[macro_use]
34mod test_macros;
35
36pub mod amount;
37#[cfg(feature = "alloc")]
38pub mod fee_rate;
39#[cfg(feature = "alloc")]
40pub mod locktime;
41#[cfg(feature = "alloc")]
42pub mod parse;
43#[cfg(feature = "alloc")]
44pub mod weight;
45
46pub use self::amount::ParseAmountError;
47#[doc(inline)]
48pub use self::amount::{Amount, SignedAmount};
49#[cfg(feature = "alloc")]
50pub use self::parse::ParseIntError;
51#[cfg(feature = "alloc")]
52#[doc(inline)]
53pub use self::{fee_rate::FeeRate, weight::Weight};
54
55#[rustfmt::skip]
56#[allow(unused_imports)]
57mod prelude {
58 #[cfg(all(feature = "alloc", not(feature = "std")))]
59 pub use alloc::{string::{String, ToString}, vec::Vec, boxed::Box, borrow::{Borrow, BorrowMut, Cow, ToOwned}, slice, rc};
60
61 #[cfg(feature = "std")]
62 pub use std::{string::{String, ToString}, vec::Vec, boxed::Box, borrow::{Borrow, BorrowMut, Cow, ToOwned}, rc};
63}