-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathCargo.toml
More file actions
executable file
·131 lines (120 loc) · 4.12 KB
/
Cargo.toml
File metadata and controls
executable file
·131 lines (120 loc) · 4.12 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[package]
name = "sol-parser-sdk"
version = "0.4.13"
edition = "2021"
authors = ["William <byteblock6@gmail.com>", "sgxiang <sgxiang@gmail.com>", "wei <1415121722@qq.com>"]
repository = "https://github.com/0xfnzero/sol-parser-sdk"
description = "A lightweight Rust library for real-time event streaming from Solana DEX trading programs. Supports PumpFun, PumpSwap, Bonk, and Raydium protocols with Yellowstone gRPC and ShredStream."
license = "MIT"
keywords = ["solana", "streaming", "events", "grpc", "shredstream"]
readme = "README.md"
[lib]
crate-type = ["rlib"]
[[example]]
name = "shredstream_pump_snipe"
path = "examples/shredstream_pump_snipe.rs"
[[bench]]
name = "zero_latency_optimizations"
harness = false
[features]
default = ["parse-borsh"] # 默认使用 Borsh 解析器(类型安全,易维护)
# 解析器插件选择;同时启用时优先使用 parse-zero-copy,默认仍使用 parse-borsh。
parse-borsh = [] # Borsh 反序列化解析器(推荐):类型安全、代码简洁、易维护
parse-zero-copy = [] # 零拷贝解析器(高性能):最快、零拷贝、适合超高频场景
# 其他功能
perf-stats = [] # 启用性能统计
ultra-perf = [] # 极限性能模式(启用所有 unsafe 优化)
[dependencies]
# Pin to 3.3.x: solana-keypair 3.1.2 + solana-signature 3.4.x can fail to compile (DecodeError / from_source)
# when publishing without local patches; 3.3.x matches solana-keypair's own dependency range.
solana-signature = { version = "3.3.0", default-features = false, features = ["std", "alloc", "verify"] }
solana-sdk = "3.0.0"
solana-client = "3.1.12"
solana-program = "3.0.0"
solana-rpc-client = "3.1.12"
solana-rpc-client-api = "3.1.12"
solana-transaction-status = "3.1.12"
solana-account-decoder = "3.1.12"
solana-hash = "3.0.0"
solana-entry = "3.0.0"
solana-system-interface = { version = "3.0.0", features = ["bincode"] }
solana-rpc-client-nonce-utils = "3.1.12"
solana-perf = "3.1.12"
solana-metrics = "3.1.12"
spl-associated-token-account = "6.0.0"
borsh = { version = "1.5.3", features = ["derive"] }
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.134"
serde-big-array = "0.5.1"
futures = "0.3.31"
futures-util = "0.3.31"
base64 = "0.22.1"
base64-simd = "0.8"
bs58 = "0.5.1"
memchr = "2.7"
rand = "0.9.0"
bincode = "1.3.3"
anyhow = "1.0.90"
yellowstone-grpc-client = "12.1.0"
yellowstone-grpc-proto = "12.4.0"
tokio = { version = "1.42.0", features = ["full", "rt-multi-thread"]}
tonic = { version = "0.13", features = ["transport"] }
rustls = { version = "0.23.23", features = ["ring"], default-features = false }
ring = "0.17"
rustls-native-certs = "0.8.1"
tokio-rustls = "0.26.1"
tokio-stream = "0.1"
http-body-util = "0.1"
log = "0.4.22"
chrono = "0.4.39"
regex = "1"
tracing = "0.1.41"
thiserror = "2.0.11"
async-trait = "0.1.86"
lazy_static = "1.5.0"
once_cell = "1.20.3"
dashmap = "6.0.1"
prost = "0.13"
prost-types = "0.13"
num_enum = "0.7.3"
num-derive = "0.4.2"
num-traits = "0.2.19"
hex = "0.4.3"
bytemuck = { version = "1.4.0" }
arrayref = "0.3.6"
borsh-derive = "1.5.5"
indicatif = "0.18.0"
maplit = "1.0.2"
env_logger = "0.11.8"
crossbeam = "0.8.4"
crossbeam-channel = "0.5"
crossbeam-queue = "0.3.12"
rayon = "1.10"
parking_lot = "0.12.1"
wide = "0.7"
spl-token = "7.0.0"
spl-token-2022 = "6.0.0"
libc = "0.2"
smallvec = "1.13" # 零延迟优化:栈分配小数组
[dev-dependencies]
criterion = { version = "0.7.0", features = ["html_reports"] }
[profile.release]
opt-level = 3
lto = "thin" # Thin LTO: 快速编译 + 良好优化(2-3分钟 vs 6分钟)
codegen-units = 16 # 并行编译(默认值,快速)
panic = 'abort'
strip = true
incremental = true # 启用增量编译(后续编译更快)
[profile.release.package."*"]
opt-level = 3
codegen-units = 1
# 极限性能配置文件(仅在需要榨取最后 5% 性能时使用,编译时间 6+ 分钟)
[profile.ultra-perf]
inherits = "release"
opt-level = 3
lto = "fat" # 全局 LTO - 非常慢但最优
codegen-units = 1 # 单线程编译 - 最优但最慢
panic = 'abort'
strip = true
incremental = false # 禁用增量编译
overflow-checks = false # 禁用溢出检查