Update to explain what I needed to go to make this compile due to conflict in crates.io versions of embassy and picoserve

This commit is contained in:
Yvan 2025-03-17 13:51:36 +00:00
parent 7ef2f97bff
commit 76329ee8ae
2 changed files with 27 additions and 1 deletions

View file

@ -7,9 +7,12 @@ version = "0.1.0"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
[dependencies] [dependencies]
# web server # web server - note local copy used as needed to change Cargo.toml to use embassy git sources
picoserve = { version = "0.15.0", path = "../picoserve/picoserve/", features = ["embassy"] } picoserve = { version = "0.15.0", path = "../picoserve/picoserve/", features = ["embassy"] }
# library for talking to the SCD40 module
libscd = { version = "0.5.0", git = "https://github.com/SvetlinZarev/libscd.git", features = ["async", "sync", "scd4x", "defmt"] } libscd = { version = "0.5.0", git = "https://github.com/SvetlinZarev/libscd.git", features = ["async", "sync", "scd4x", "defmt"] }
embassy-embedded-hal = { version = "0.3.0", git = "https://github.com/embassy-rs/embassy.git", features = ["defmt"] } embassy-embedded-hal = { version = "0.3.0", git = "https://github.com/embassy-rs/embassy.git", features = ["defmt"] }
embassy-sync = { version = "0.6.2", git = "https://github.com/embassy-rs/embassy.git", features = ["defmt"] } embassy-sync = { version = "0.6.2", git = "https://github.com/embassy-rs/embassy.git", features = ["defmt"] }
embassy-executor = { version = "0.7.0", git = "https://github.com/embassy-rs/embassy.git", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } embassy-executor = { version = "0.7.0", git = "https://github.com/embassy-rs/embassy.git", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }

View file

@ -6,6 +6,29 @@ with an I2C SCD40 module.
***This is a work in progress.*** ***This is a work in progress.***
## Compiling - picoserve mod
I struggled to get `embassy` + `picoserve` to compile together using crates.io
sources. Despite the version number of `embassy` being the same it seems that
using the git sources fixes the problem (the issue is with
`embassy-time-driver`). But to achieve this I had to also edit the
`picoserve/Cargo.toml` in the `picoserve` project, which I have checked out and
sat alongside this project tree and referenced directly in this project's
`Cargo.toml`. Hopefully in time the issue with the crates.io compatibility will
be resolved.
```diff
diff --git a/picoserve/Cargo.toml b/picoserve/Cargo.toml
index 5bb0084..c9ad350 100644
--- a/picoserve/Cargo.toml
+++ b/picoserve/Cargo.toml
@@ -20,2 +20,2 @@ defmt = { version = "0.3.6", optional = true }
-embassy-net = { version = ">=0.6.0", optional = true, features = ["tcp", "proto-ipv4", "medium-ethernet"] }
-embassy-time = { version = ">=0.4.0", optional = true }
+embassy-net = { version = "0.7.0", git = "https://github.com/embassy-rs/embassy.git", optional = true, features = ["tcp", "proto-ipv4", "medium-ethernet"] }
+embassy-time = { version = "0.4.0", git = "https://github.com/embassy-rs/embassy.git", optional = true }
```
## License ## License
`scd40-rusty-pi` is licensed under either of `scd40-rusty-pi` is licensed under either of