[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_61"] } # 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 } # for non_async futures = { version = "0.3", default-features = false } defmt = { version = "0.3", optional = true } [features] std = ["snafu/std", "snafu/backtrace", "ssh-key/alloc"] 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"] defmt = ["dep:defmt"] [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" } # 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 # 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