Skip to content

Commit

Permalink
Don't use defmt
Browse files Browse the repository at this point in the history
Compatibility with `log` is a hassle, rtt-logger should work instead
(not done yet)
  • Loading branch information
mkj committed May 30, 2024
1 parent 06992a3 commit de161d1
Show file tree
Hide file tree
Showing 20 changed files with 28 additions and 207 deletions.
110 changes: 14 additions & 96 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,13 @@ 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", "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"]
defmt = ["dep:defmt"]

# Allocate larger buffers for things such as usernames.
# See config.rs for details
Expand Down
4 changes: 0 additions & 4 deletions embassy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ sunset = { version = "0.2.0", path = "../", features = ["embedded-io"] }

log = { version = "0.4" }

defmt = { version = "0.3", optional = true }

[features]
defmt = ["dep:defmt"]

# Remove any use of `unsafe`. This currently requires
# nightly and -Zpolonius (not ready yet)
try-polonius = []
7 changes: 1 addition & 6 deletions embassy/demos/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sunset = { path = "../../.." }
sunset-sshwire-derive = { path = "../../../sshwire-derive" }

embassy-sync = { version = "0.5" }
embassy-net = { version = "0.4", features = ["tcp", "dhcpv4", "medium-ethernet"] }
embassy-net = { version = "0.4", features = ["tcp", "dhcpv4", "medium-ethernet", "log"] }
embassy-net-driver = { version = "0.2" }
embassy-futures = { version = "0.1" }
embassy-time = { version = "0.3" }
Expand All @@ -24,15 +24,10 @@ hmac = { version = "0.12", default-features = false }
bcrypt = { version = "0.15", default-features = false }
ed25519-dalek = { version = "2.0.0-rc.2", default-features = false }

defmt = { version = "0.3", optional = true }
log = "0.4"
pretty-hex = { version = "0.4", default-features = false }

[dev-dependencies]
anyhow = { version = "1.0" }
sunset = { path = "../../..", features = ["std"] }
tokio = { version = "1.25", features = ["full"] }

[features]
defmt = ["dep:defmt", "embedded-io-async/defmt-03", "embassy-net/defmt"]
log = ["embassy-net/log"]
5 changes: 0 additions & 5 deletions embassy/demos/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
use sunset::error::{Error, Result, TrapBug};

#[allow(unused_imports)]
#[cfg(not(feature = "defmt"))]
use log::{debug, error, info, log, trace, warn};

#[allow(unused)]
#[cfg(feature = "defmt")]
use defmt::{debug, error, info, panic, trace, warn};

use hmac::{Hmac, Mac};
use sha2::Sha256;

Expand Down
Loading

0 comments on commit de161d1

Please sign in to comment.