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    gca_const_items,
13    gca_min_const_items,
14    impl_restriction,
15    inherent_associated_types,
16    min_adt_const_params,
17    mut_restriction,
18    portable_simd,
19    step_trait,
20    trusted_len
21)]
22#![cfg_attr(feature = "alloc", feature(maybe_uninit_fill))]
23#![expect(incomplete_features, reason = "generic_const_*")]
24
25pub mod address;
26pub mod balance;
27pub mod block;
28#[cfg(feature = "scale-codec")]
29pub mod checksum;
30pub mod ed25519;
31pub mod hashes;
32mod nano_u256;
33pub mod pieces;
34pub mod pos;
35pub mod pot;
36pub mod sectors;
37pub mod segments;
38pub mod shard;
39pub mod solutions;
40pub mod transaction;
41pub mod trees;
42
43#[cfg(feature = "alloc")]
44extern crate alloc;
45
46const {
47    assert!(
48        size_of::<usize>() >= size_of::<u32>(),
49        "Must be at least 32-bit platform"
50    );
51}