refactor: modernize dependency stack and minimize footprint

- Migrate to native 'std::sync' primitives (LazyLock, OnceLock, RwLock).
- Replace 'parking_lot' with std library synchronization types.
- Switch from 'chrono' to 'std::time::SystemTime' for lightweight timestamps.
- Bump core dependencies: tokio (1.50.0) and rustls (0.23.37).
- Decouple 'solana-program' by utilizing 'solana-sdk' re-exports.
- Prune redundant crates: lazy_static, once_cell, chrono, maplit, and parking_lot.
- Remove unused dev-dependencies (criterion) and example-only utils (env_logger).
- Improve compile times and reduce supply chain attack surface.
This commit is contained in:
Estereg
2026-03-07 06:44:42 +00:00
parent 7270372604
commit 0c369e23a8
12 changed files with 42 additions and 52 deletions
+2 -3
View File
@@ -406,9 +406,8 @@ impl EventPrettyPool {
}
// 全局池管理器实例
lazy_static::lazy_static! {
pub static ref GLOBAL_POOL_MANAGER: PoolManager = PoolManager::new();
}
pub static GLOBAL_POOL_MANAGER: std::sync::LazyLock<PoolManager> =
std::sync::LazyLock::new(PoolManager::new);
/// 便捷的全局工厂函数
pub mod factory {