-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
57 lines (50 loc) · 1.58 KB
/
Cargo.toml
File metadata and controls
57 lines (50 loc) · 1.58 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
# P2P File Transfer
#
# Build Options:
# cargo build --release # CLI only (default, ~3 MB)
# cargo build --release --features full # CLI + GUI (~7 MB)
# cargo build --release --features gui --no-default-features # GUI only (~6 MB)
# cargo build --release --features cli --no-default-features # CLI only (explicit, ~3 MB)
[package]
name = "p2p-transfer"
version = "0.1.0"
edition = "2021"
authors = ["cDc <cdc.seacave@gmail.com>"]
description = "A lightweight P2P file transfer tool with compression"
license = "MIT"
repository = "https://github.com/yourusername/p2p-transfer"
keywords = ["p2p", "file-transfer", "compression", "networking"]
categories = ["command-line-utilities", "network-programming"]
[workspace]
members = [".", "p2p-core", "p2p-cli", "p2p-gui"]
[dependencies]
p2p-core = { path = "./p2p-core" }
p2p-cli = { path = "./p2p-cli", optional = true }
p2p-gui = { path = "./p2p-gui", optional = true }
tokio = { version = "1.40", features = ["full"] }
anyhow = "1.0"
thiserror = "1.0"
log = "0.4"
env_logger = "0.11"
tracing = "0.1"
[features]
# Default: CLI only (small binary, ~5-10 MB)
default = ["cli"]
# CLI interface with all core features
cli = ["p2p-cli"]
# GUI interface with Iced framework (large binary, ~60+ MB due to graphics dependencies)
gui = ["p2p-gui", "p2p-cli/gui"]
# Build both CLI and GUI
full = ["cli", "gui"]
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
panic = "abort"
[profile.release-small]
inherits = "release"
opt-level = "z"
lto = true
codegen-units = 1
strip = true