1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// LCPFS: Platform Abstraction Layer
// PURPOSE: Isolate architecture-specific code for portability
// ARCHITECTURE: Compile-time feature selection via cfg attributes
//! Platform-specific implementations for LCPFS.
//!
//! This module provides portable abstractions over architecture-specific
//! functionality, primarily for entropy generation.
//!
//! # Supported Architectures
//!
//! - **x86_64**: Hardware RNG (RDRAND), timestamp counter (RDTSC), Linux syscalls
//! - **aarch64**: ARM64 CNTVCT (virtual counter), Linux getrandom syscall
//! - **fallback**: Software-only entropy (NOT cryptographically secure)
//!
//! # Usage
//!
//! ```rust,ignore
//! use lcpfs::arch::{fill_hardware_entropy, get_timestamp};
//!
//! let mut buf = [0u8; 32];
//! if fill_hardware_entropy(&mut buf).is_ok() {
//! // Got hardware entropy
//! }
//!
//! let timestamp = get_timestamp();
//! ```
// Re-export platform-specific implementations under common names
pub use *;
pub use *;
pub use *;
/// Error type for platform-specific operations