Skip to content

Commit

Permalink
✨ adds some dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
chriamue committed Feb 4, 2024
1 parent 77ad0b3 commit 05c57e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ experimental = ["esp-idf-svc/experimental"]
embassy = ["esp-idf-svc/embassy-sync", "esp-idf-svc/critical-section", "esp-idf-svc/embassy-time-driver"]

[dependencies]
anyhow = "1.0.79"
log = { version = "0.4", default-features = false }
esp-idf-sys = { version = "0.34", features = ["binstart"] }
esp-idf-svc = { version = "0.48", default-features = false }

[build-dependencies]
Expand Down
12 changes: 8 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
fn main() {
// It is necessary to call this function once. Otherwise some patches to the runtime
// implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71
use anyhow::Ok;
use esp_idf_sys::esp_app_desc;

esp_app_desc!();

fn main() -> anyhow::Result<()> {
esp_idf_svc::sys::link_patches();

// Bind the log crate to the ESP Logging facilities
esp_idf_svc::log::EspLogger::initialize_default();

log::info!("Hello, world!");

Ok(())
}

0 comments on commit 05c57e2

Please sign in to comment.