From 3294ca36ce586d051d67875ca45b1bd2d1f4bc65 Mon Sep 17 00:00:00 2001 From: James Munns Date: Sun, 12 May 2024 21:07:37 +0200 Subject: [PATCH 1/2] FAQ: add `patch.crates-io` example --- docs/modules/ROOT/pages/faq.adoc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/modules/ROOT/pages/faq.adoc b/docs/modules/ROOT/pages/faq.adoc index a074594cc..fe30b68d6 100644 --- a/docs/modules/ROOT/pages/faq.adoc +++ b/docs/modules/ROOT/pages/faq.adoc @@ -290,3 +290,25 @@ General steps: 5. Copy data to that region before using BDMA. See link:/examples/stm32h7/src/bin/spi_bdma.rs[this example] for more details. + +=== How do I switch to the `main` branch? + +Sometimes to test new changes or fixes, you'll want to switch your project to using a version from GitHub. + +You can add a section to your `Cargo.toml` file like this, you'll need to patch ALL embassy crates to the same revision: + +Using `patch` will replace all direct AND indirect dependencies. + +[source,toml] +---- +[patch.crates-io] +# make sure to get the latest git rev from github, you can see the latest one here: +# https://github.com/embassy-rs/embassy/commits/main/ +embassy-embedded-hal = { git = "https://github.com/embassy-rs/embassy", rev = "4cade64ebd34bf93458f17cfe85c5f710d0ff13c" } +embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "4cade64ebd34bf93458f17cfe85c5f710d0ff13c" } +embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "4cade64ebd34bf93458f17cfe85c5f710d0ff13c" } +embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "4cade64ebd34bf93458f17cfe85c5f710d0ff13c" } +embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "4cade64ebd34bf93458f17cfe85c5f710d0ff13c" } +embassy-usb = { git = "https://github.com/embassy-rs/embassy", rev = "4cade64ebd34bf93458f17cfe85c5f710d0ff13c" } +embassy-usb-driver = { git = "https://github.com/embassy-rs/embassy", rev = "4cade64ebd34bf93458f17cfe85c5f710d0ff13c" } +---- From 61fa95f3539d4e0f645464068b609ce9f2146d91 Mon Sep 17 00:00:00 2001 From: James Munns Date: Sun, 12 May 2024 21:09:51 +0200 Subject: [PATCH 2/2] Update docs/modules/ROOT/pages/faq.adoc --- docs/modules/ROOT/pages/faq.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/modules/ROOT/pages/faq.adoc b/docs/modules/ROOT/pages/faq.adoc index fe30b68d6..6c7126cd6 100644 --- a/docs/modules/ROOT/pages/faq.adoc +++ b/docs/modules/ROOT/pages/faq.adoc @@ -299,6 +299,8 @@ You can add a section to your `Cargo.toml` file like this, you'll need to patch Using `patch` will replace all direct AND indirect dependencies. +See the link:https://embassy.dev/book/dev/new_project.html#_cargo_toml[new project docs] for more details on this approach. + [source,toml] ---- [patch.crates-io]