-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCargo.toml
127 lines (110 loc) · 4.63 KB
/
Cargo.toml
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
[package]
name = "sunset"
version = "0.2.0"
edition = "2021"
description = "A SSH library suitable for embedded and larger programs"
repository = "https://github.com/mkj/sunset"
categories = ["network-programming", "embedded", "no-std"]
license = "0BSD"
keywords = ["ssh"]
[workspace]
members = [
"sshwire-derive",
"async",
"embassy",
"embassy/demos/common",
"embassy/demos/picow",
"embassy/demos/std",
]
[dependencies]
sunset-sshwire-derive = { version = "0.2", path = "sshwire-derive" }
snafu = { version = "0.8", default-features = false, features = ["rust_1_65"] }
# TODO: check that log macro calls disappear in no_std builds
log = { version = "0.4" }
heapless = "0.8"
# allows avoiding utf8 for SSH identifier names
ascii = { version = "1.0", default-features = false }
getrandom = "0.2"
rand_core = { version = "0.6", default-features = false, features = ["getrandom"]}
ctr = { version = "0.9", features = ["zeroize"] }
aes = { version = "0.8", features = ["zeroize"] }
chacha20 = { version = "0.9", features = ["zeroize"] }
sha2 = { version = "0.10", default-features = false }
hmac = "0.12"
poly1305 = "0.8"
digest = "0.10"
signature = { version = "2.0", default-features = false }
zeroize = { version = "1", default-features = false, features = ["derive"] }
cipher = { version = "0.4", features = ["zeroize"] }
subtle = { version = "2.4", default-features = false }
# ed25519/x25519
# fork allows hashing by parts (sign/verify from sshwire), and zeroize
ed25519-dalek = { version = "2.0.0-rc.3", default-features = false, features = ["zeroize", "rand_core", "hazmat"] }
x25519-dalek = { version = "2.0.0-rc.3", default-features = false, features = ["zeroize"] }
curve25519-dalek = { version = "4.0.0", default-features = false, features = ["zeroize"] }
# p521 = { version = "0.13.2", default-features = false, features = ["ecdh", "ecdsa"] }
rsa = { version = "0.9", default-features = false, optional = true, features = ["sha2"] }
# TODO: getrandom feature is a workaround for missing ssh-key dependency with rsa. fixed in pending 0.6
ssh-key = { version = "0.6", default-features = false, optional = true, features = ["getrandom"] }
embedded-io = { version = "0.6", optional = true }
# for debug printing
pretty-hex = { version = "0.4", default-features = false }
[features]
std = ["snafu/std", "snafu/backtrace", "ssh-key/alloc", "larger"]
rsa = ["dep:rsa", "ssh-key/rsa"]
# allows conversion to/from OpenSSH key formats
openssh-key = ["ssh-key"]
# implements embedded_io::Error for sunset::Error
embedded-io = ["dep:embedded-io"]
# Allocate larger buffers for things such as usernames.
# See config.rs for details
larger = []
[dev-dependencies]
# examples want std::error
snafu = { version = "0.8", default-features = true }
anyhow = { version = "1.0" }
pretty-hex = "0.4"
simplelog = { version = "0.12", features = ["test"] }
#[patch.crates-io]
#curve25519-dalek = { git = "https://github.com/mkj/curve25519-dalek", branch = "sunset" }
#ed25519-dalek = { git = "https://github.com/mkj/curve25519-dalek", branch = "sunset" }
#x25519-dalek = { git = "https://github.com/mkj/curve25519-dalek", branch = "sunset" }
# [patch.crates-io]
# cyw43 = { path = "/home/matt/3rd/rs/embassy-stable-sunset/cyw43" }
# embassy-time = { path = "/home/matt/3rd/rs/embassy-stable-sunset/embassy-time" }
# embassy-time-driver = { path = "/home/matt/3rd/rs/embassy-stable-sunset/embassy-time-driver" }
# embassy-time-queue-driver = { path = "/home/matt/3rd/rs/embassy-stable-sunset/embassy-time-queue-driver" }
# embassy-sync = { path = "/home/matt/3rd/rs/embassy-stable-sunset/embassy-sync" }
# embassy-net = { path = "/home/matt/3rd/rs/embassy-stable-sunset/embassy-net" }
# embassy-net-driver = { path = "/home/matt/3rd/rs/embassy-stable-sunset/embassy-net-driver" }
# embassy-net-driver-channel = { path = "/home/matt/3rd/rs/embassy-stable-sunset/embassy-net-driver-channel" }
# embassy-executor = { path = "/home/matt/3rd/rs/embassy-stable-sunset/embassy-executor" }
# embassy-executor-macros = { path = "/home/matt/3rd/rs/embassy-stable-sunset/embassy-executor-macros" }
# these are mostly applicable to picow, but can't hurt generally
[profile.dev]
debug = 2
debug-assertions = true
opt-level = 1
overflow-checks = true
[profile.release]
codegen-units = 1
debug = 2
debug-assertions = false
incremental = false
lto = "fat"
opt-level = 'z'
overflow-checks = false
panic = "abort"
# do not optimize proc-macro crates = faster builds from scratch
[profile.dev.build-override]
codegen-units = 8
debug = false
debug-assertions = false
opt-level = 0
overflow-checks = false
[profile.release.build-override]
codegen-units = 8
debug = false
debug-assertions = false
opt-level = 0
overflow-checks = false