Skip to main content

ab_core_primitives/
lib.rs

1//! Core primitives for the protocol
2
3#![cfg_attr(any(target_os = "none", target_os = "unknown"), no_std)]
4#![warn(rust_2018_idioms, missing_debug_implementations, missing_docs)]
5#![feature(
6    const_block_items,
7    const_cmp,
8    const_convert,
9    const_default,
10    const_trait_impl,
11    const_try,
12    generic_const_args,
13    inherent_associated_types,
14    min_generic_const_args,
15    portable_simd,
16    slice_split_once,
17    step_trait,
18    trusted_len
19)]
20#![cfg_attr(feature = "alloc", feature(impl_restriction, maybe_uninit_fill))]
21#![expect(incomplete_features, reason = "generic_const_*")]
22
23pub mod address;
24pub mod balance;
25pub mod block;
26#[cfg(feature = "scale-codec")]
27pub mod checksum;
28pub mod ed25519;
29pub mod hashes;
30mod nano_u256;
31pub mod pieces;
32pub mod pos;
33pub mod pot;
34pub mod sectors;
35pub mod segments;
36pub mod shard;
37pub mod solutions;
38pub mod transaction;
39
40#[cfg(feature = "alloc")]
41extern crate alloc;
42
43const {
44    assert!(
45        size_of::<usize>() >= size_of::<u32>(),
46        "Must be at least 32-bit platform"
47    );
48}