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