-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsample-project-Cargo.toml
More file actions
95 lines (79 loc) · 3.27 KB
/
sample-project-Cargo.toml
File metadata and controls
95 lines (79 loc) · 3.27 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
# Sample Cargo.toml for projects using khodpay-wallet libraries
#
# Copy this configuration to integrate bip39 and bip32 into your project
[package]
name = "my-bitcoin-wallet"
version = "0.1.0"
edition = "2021"
rust-version = "1.70"
[dependencies]
# ============================================================================
# Option 1: Local Path Dependencies (for development/testing)
# ============================================================================
# Uncomment these if the khodpay-wallet repo is on your local machine
# bip39 = { path = "../khodpay-wallet/crates/bip39" }
# bip32 = { path = "../khodpay-wallet/crates/bip32" }
# ============================================================================
# Option 2: Git Dependencies (recommended for production)
# ============================================================================
# Uncomment and update the git URL when the repo is published
# bip39 = { git = "https://github.com/your-org/khodpay-wallet", tag = "v0.1.0" }
# bip32 = { git = "https://github.com/your-org/khodpay-wallet", tag = "v0.1.0" }
# ============================================================================
# Option 3: Published Crates (when published to crates.io)
# ============================================================================
# bip39 = "0.1.0"
# bip32 = "0.1.0"
# ============================================================================
# Additional Dependencies (if needed)
# ============================================================================
# For hex encoding/decoding
hex = "0.4"
# For error handling
thiserror = "1.0"
anyhow = "1.0"
# For serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# For secure random generation
rand = "0.8"
# ============================================================================
# Development Dependencies
# ============================================================================
[dev-dependencies]
# For testing
criterion = "0.5" # For benchmarks
# ============================================================================
# Features (optional)
# ============================================================================
[features]
default = []
# Example: Enable all features
full = []
# Example: Enable specific functionality
mainnet-only = []
testnet-only = []
# ============================================================================
# Build Configuration
# ============================================================================
[profile.release]
opt-level = 3 # Maximum optimization
lto = true # Link-time optimization
codegen-units = 1 # Better optimization, slower compile
strip = true # Strip symbols
panic = 'abort' # Smaller binary size
[profile.dev]
opt-level = 0 # No optimization for faster compilation
# ============================================================================
# Example Binary
# ============================================================================
[[bin]]
name = "wallet-cli"
path = "src/main.rs"
# ============================================================================
# Example Library
# ============================================================================
[lib]
name = "my_wallet"
path = "src/lib.rs"
crate-type = ["lib", "rlib"]