chaincraft_rust/
lib.rs

1//! Chaincraft - A blockchain education and prototyping platform
2//!
3//! This library provides a clean, well-documented implementation of core blockchain concepts
4//! with a focus on performance, security, and educational value.
5
6#![allow(incomplete_features)]
7#![allow(dead_code)]
8#![allow(unused_imports)]
9#![allow(unused_variables)]
10
11// Modules
12pub mod consensus;
13pub mod crypto;
14pub mod discovery;
15pub mod error;
16pub mod examples;
17pub mod network;
18pub mod node;
19pub mod shared;
20pub mod shared_object;
21pub mod storage;
22pub mod types;
23pub mod utils;
24
25// Re-exports
26pub use error::{ChaincraftError, Result};
27pub use network::{PeerId, PeerInfo};
28pub use node::ChaincraftNode;
29pub use shared::{SharedMessage, SharedObject, SharedObjectId, SharedObjectRegistry};
30
31// Application object re-exports
32pub use shared_object::{ApplicationObject, ApplicationObjectRegistry, SimpleSharedNumber};
33
34// Version information
35pub const VERSION: &str = env!("CARGO_PKG_VERSION");
36pub const NAME: &str = env!("CARGO_PKG_NAME");
37pub const DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");
38
39/// Default network port for Chaincraft nodes
40pub const DEFAULT_PORT: u16 = 8080;
41
42/// Maximum number of peers by default
43pub const DEFAULT_MAX_PEERS: usize = 10;
44
45/// Default gossip interval in milliseconds
46pub const DEFAULT_GOSSIP_INTERVAL_MS: u64 = 500;