aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-01-10 17:40:10 +0000
committerGitHub <[email protected]>2024-01-10 17:40:10 +0000
commitdcffad6b05a06bc5f4d09a35184d5ffe158e02cf (patch)
treedab09dc4ce499676fa1681a18c2125e16aed6aa4
parent77e60ecff82e26985257c43828b7232d2b78addf (diff)
parent68166eda6820ece3219f221b76fe26bd6f71e3c4 (diff)
Merge pull request #2428 from embassy-rs/no-nightly
Remove nightly autodetect, update readme MSRV.
-rw-r--r--README.md10
-rw-r--r--embassy-embedded-hal/build.rs18
-rw-r--r--embassy-embedded-hal/src/lib.rs2
-rw-r--r--embassy-net/build.rs18
-rw-r--r--embassy-sync/build.rs13
-rw-r--r--embassy-sync/src/lib.rs2
-rw-r--r--embassy-time/build.rs19
-rw-r--r--embassy-time/src/lib.rs2
8 files changed, 3 insertions, 81 deletions
diff --git a/README.md b/README.md
index 714104331..d2a24dfcc 100644
--- a/README.md
+++ b/README.md
@@ -136,14 +136,8 @@ please refer to the `.vscode/settings.json` file's `rust-analyzer.linkedProjects
136 136
137## Minimum supported Rust version (MSRV) 137## Minimum supported Rust version (MSRV)
138 138
139Embassy is guaranteed to compile on the latest stable Rust version at the time of release. It might compile with older versions but that may change in any new patch release. 139Embassy is guaranteed to compile on stable Rust 1.75 and up. It *might*
140 140compile with older versions but that may change in any new patch release.
141Several features require nightly:
142
143- The `#[embassy_executor::main]` and `#[embassy_executor::task]` attribute macros.
144- Async traits
145
146These are enabled by activating the `nightly` Cargo feature. If you do so, Embassy is guaranteed to compile on the exact nightly version specified in `rust-toolchain.toml`. It might compile with older or newer nightly versions, but that may change in any new patch release.
147 141
148## Why the name? 142## Why the name?
149 143
diff --git a/embassy-embedded-hal/build.rs b/embassy-embedded-hal/build.rs
deleted file mode 100644
index 78bd27ec7..000000000
--- a/embassy-embedded-hal/build.rs
+++ /dev/null
@@ -1,18 +0,0 @@
1use std::env;
2use std::ffi::OsString;
3use std::process::Command;
4
5fn main() {
6 println!("cargo:rerun-if-changed=build.rs");
7
8 let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc"));
9
10 let output = Command::new(rustc)
11 .arg("--version")
12 .output()
13 .expect("failed to run `rustc --version`");
14
15 if String::from_utf8_lossy(&output.stdout).contains("nightly") {
16 println!("cargo:rustc-cfg=nightly");
17 }
18}
diff --git a/embassy-embedded-hal/src/lib.rs b/embassy-embedded-hal/src/lib.rs
index b40f892f4..ee974324b 100644
--- a/embassy-embedded-hal/src/lib.rs
+++ b/embassy-embedded-hal/src/lib.rs
@@ -1,6 +1,4 @@
1#![cfg_attr(not(feature = "std"), no_std)] 1#![cfg_attr(not(feature = "std"), no_std)]
2#![cfg_attr(nightly, feature(async_fn_in_trait, impl_trait_projections))]
3#![cfg_attr(nightly, allow(stable_features, unknown_lints))]
4#![allow(async_fn_in_trait)] 2#![allow(async_fn_in_trait)]
5#![warn(missing_docs)] 3#![warn(missing_docs)]
6 4
diff --git a/embassy-net/build.rs b/embassy-net/build.rs
deleted file mode 100644
index 78bd27ec7..000000000
--- a/embassy-net/build.rs
+++ /dev/null
@@ -1,18 +0,0 @@
1use std::env;
2use std::ffi::OsString;
3use std::process::Command;
4
5fn main() {
6 println!("cargo:rerun-if-changed=build.rs");
7
8 let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc"));
9
10 let output = Command::new(rustc)
11 .arg("--version")
12 .output()
13 .expect("failed to run `rustc --version`");
14
15 if String::from_utf8_lossy(&output.stdout).contains("nightly") {
16 println!("cargo:rustc-cfg=nightly");
17 }
18}
diff --git a/embassy-sync/build.rs b/embassy-sync/build.rs
index 0a796b881..afd76dad1 100644
--- a/embassy-sync/build.rs
+++ b/embassy-sync/build.rs
@@ -1,21 +1,8 @@
1use std::env; 1use std::env;
2use std::ffi::OsString;
3use std::process::Command;
4 2
5fn main() { 3fn main() {
6 println!("cargo:rerun-if-changed=build.rs"); 4 println!("cargo:rerun-if-changed=build.rs");
7 5
8 let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc"));
9
10 let output = Command::new(rustc)
11 .arg("--version")
12 .output()
13 .expect("failed to run `rustc --version`");
14
15 if String::from_utf8_lossy(&output.stdout).contains("nightly") {
16 println!("cargo:rustc-cfg=nightly");
17 }
18
19 let target = env::var("TARGET").unwrap(); 6 let target = env::var("TARGET").unwrap();
20 7
21 if target.starts_with("thumbv6m-") { 8 if target.starts_with("thumbv6m-") {
diff --git a/embassy-sync/src/lib.rs b/embassy-sync/src/lib.rs
index b0ccfde57..d88c76db5 100644
--- a/embassy-sync/src/lib.rs
+++ b/embassy-sync/src/lib.rs
@@ -1,6 +1,4 @@
1#![cfg_attr(not(any(feature = "std", feature = "wasm")), no_std)] 1#![cfg_attr(not(any(feature = "std", feature = "wasm")), no_std)]
2#![cfg_attr(nightly, feature(async_fn_in_trait, impl_trait_projections))]
3#![cfg_attr(nightly, allow(stable_features, unknown_lints))]
4#![allow(async_fn_in_trait)] 2#![allow(async_fn_in_trait)]
5#![allow(clippy::new_without_default)] 3#![allow(clippy::new_without_default)]
6#![doc = include_str!("../README.md")] 4#![doc = include_str!("../README.md")]
diff --git a/embassy-time/build.rs b/embassy-time/build.rs
index 78bd27ec7..f328e4d9d 100644
--- a/embassy-time/build.rs
+++ b/embassy-time/build.rs
@@ -1,18 +1 @@
1use std::env; fn main() {}
2use std::ffi::OsString;
3use std::process::Command;
4
5fn main() {
6 println!("cargo:rerun-if-changed=build.rs");
7
8 let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc"));
9
10 let output = Command::new(rustc)
11 .arg("--version")
12 .output()
13 .expect("failed to run `rustc --version`");
14
15 if String::from_utf8_lossy(&output.stdout).contains("nightly") {
16 println!("cargo:rustc-cfg=nightly");
17 }
18}
diff --git a/embassy-time/src/lib.rs b/embassy-time/src/lib.rs
index a59ee68d2..7e2546f68 100644
--- a/embassy-time/src/lib.rs
+++ b/embassy-time/src/lib.rs
@@ -1,6 +1,4 @@
1#![cfg_attr(not(any(feature = "std", feature = "wasm", test)), no_std)] 1#![cfg_attr(not(any(feature = "std", feature = "wasm", test)), no_std)]
2#![cfg_attr(nightly, feature(async_fn_in_trait, impl_trait_projections))]
3#![cfg_attr(nightly, allow(stable_features, unknown_lints))]
4#![allow(async_fn_in_trait)] 2#![allow(async_fn_in_trait)]
5#![doc = include_str!("../README.md")] 3#![doc = include_str!("../README.md")]
6#![allow(clippy::new_without_default)] 4#![allow(clippy::new_without_default)]