diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-11-29 17:23:48 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-11-29 17:26:33 +0100 |
| commit | c6989dfbca51787146f50270c671af9db434f577 (patch) | |
| tree | 5974a8ec41c108d5208e4f68027b918d424a2046 /embassy-net | |
| parent | 384bad7bfaa1f2415baf2cd3b69ebf36dc0a02d7 (diff) | |
Remove nightly and unstable-traits features in preparation for 1.75.
Diffstat (limited to 'embassy-net')
| -rw-r--r-- | embassy-net/Cargo.toml | 10 | ||||
| -rw-r--r-- | embassy-net/build.rs | 18 | ||||
| -rw-r--r-- | embassy-net/src/dns.rs | 1 | ||||
| -rw-r--r-- | embassy-net/src/lib.rs | 5 | ||||
| -rw-r--r-- | embassy-net/src/tcp.rs | 2 |
5 files changed, 25 insertions, 11 deletions
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index fe8344f5b..f106582e8 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml | |||
| @@ -15,11 +15,11 @@ categories = [ | |||
| 15 | [package.metadata.embassy_docs] | 15 | [package.metadata.embassy_docs] |
| 16 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/" | 16 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/" |
| 17 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/" | 17 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/" |
| 18 | features = ["nightly", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] | 18 | features = ["defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] |
| 19 | target = "thumbv7em-none-eabi" | 19 | target = "thumbv7em-none-eabi" |
| 20 | 20 | ||
| 21 | [package.metadata.docs.rs] | 21 | [package.metadata.docs.rs] |
| 22 | features = ["nightly", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] | 22 | features = ["defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "igmp"] |
| 23 | 23 | ||
| 24 | [features] | 24 | [features] |
| 25 | default = [] | 25 | default = [] |
| @@ -27,8 +27,6 @@ std = [] | |||
| 27 | 27 | ||
| 28 | defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt", "heapless/defmt-03"] | 28 | defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt", "heapless/defmt-03"] |
| 29 | 29 | ||
| 30 | nightly = ["dep:embedded-io-async", "dep:embedded-nal-async"] | ||
| 31 | |||
| 32 | udp = ["smoltcp/socket-udp"] | 30 | udp = ["smoltcp/socket-udp"] |
| 33 | tcp = ["smoltcp/socket-tcp"] | 31 | tcp = ["smoltcp/socket-tcp"] |
| 34 | dns = ["smoltcp/socket-dns", "smoltcp/proto-dns"] | 32 | dns = ["smoltcp/socket-dns", "smoltcp/proto-dns"] |
| @@ -54,7 +52,7 @@ smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp.git", rev = "b57e2f9e70 | |||
| 54 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } | 52 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } |
| 55 | embassy-time = { version = "0.1.5", path = "../embassy-time" } | 53 | embassy-time = { version = "0.1.5", path = "../embassy-time" } |
| 56 | embassy-sync = { version = "0.4.0", path = "../embassy-sync" } | 54 | embassy-sync = { version = "0.4.0", path = "../embassy-sync" } |
| 57 | embedded-io-async = { version = "0.6.1", optional = true } | 55 | embedded-io-async = { version = "0.6.1" } |
| 58 | 56 | ||
| 59 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } | 57 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } |
| 60 | heapless = { version = "0.8", default-features = false } | 58 | heapless = { version = "0.8", default-features = false } |
| @@ -63,4 +61,4 @@ generic-array = { version = "0.14.4", default-features = false } | |||
| 63 | stable_deref_trait = { version = "1.2.0", default-features = false } | 61 | stable_deref_trait = { version = "1.2.0", default-features = false } |
| 64 | futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } | 62 | futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] } |
| 65 | atomic-pool = "1.0" | 63 | atomic-pool = "1.0" |
| 66 | embedded-nal-async = { version = "0.7.1", optional = true } | 64 | embedded-nal-async = { version = "0.7.1" } |
diff --git a/embassy-net/build.rs b/embassy-net/build.rs new file mode 100644 index 000000000..78bd27ec7 --- /dev/null +++ b/embassy-net/build.rs | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | use std::env; | ||
| 2 | use std::ffi::OsString; | ||
| 3 | use std::process::Command; | ||
| 4 | |||
| 5 | fn 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-net/src/dns.rs b/embassy-net/src/dns.rs index 69fc5cdf1..a1151d5e4 100644 --- a/embassy-net/src/dns.rs +++ b/embassy-net/src/dns.rs | |||
| @@ -72,7 +72,6 @@ where | |||
| 72 | } | 72 | } |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | #[cfg(feature = "nightly")] | ||
| 76 | impl<'a, D> embedded_nal_async::Dns for DnsSocket<'a, D> | 75 | impl<'a, D> embedded_nal_async::Dns for DnsSocket<'a, D> |
| 77 | where | 76 | where |
| 78 | D: Driver + 'static, | 77 | D: Driver + 'static, |
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index 58310b203..bf1468642 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #![cfg_attr(not(feature = "std"), no_std)] | 1 | #![cfg_attr(not(feature = "std"), no_std)] |
| 2 | #![cfg_attr(feature = "nightly", feature(async_fn_in_trait, impl_trait_projections))] | 2 | #![cfg_attr(nightly, feature(async_fn_in_trait, impl_trait_projections))] |
| 3 | #![cfg_attr(feature = "nightly", allow(stable_features, unknown_lints, async_fn_in_trait))] | 3 | #![cfg_attr(nightly, allow(stable_features, unknown_lints))] |
| 4 | #![allow(async_fn_in_trait)] | ||
| 4 | #![warn(missing_docs)] | 5 | #![warn(missing_docs)] |
| 5 | #![doc = include_str!("../README.md")] | 6 | #![doc = include_str!("../README.md")] |
| 6 | 7 | ||
diff --git a/embassy-net/src/tcp.rs b/embassy-net/src/tcp.rs index 90fd08e94..dcfb5c96e 100644 --- a/embassy-net/src/tcp.rs +++ b/embassy-net/src/tcp.rs | |||
| @@ -515,7 +515,6 @@ impl<'d> TcpIo<'d> { | |||
| 515 | } | 515 | } |
| 516 | } | 516 | } |
| 517 | 517 | ||
| 518 | #[cfg(feature = "nightly")] | ||
| 519 | mod embedded_io_impls { | 518 | mod embedded_io_impls { |
| 520 | use super::*; | 519 | use super::*; |
| 521 | 520 | ||
| @@ -584,7 +583,6 @@ mod embedded_io_impls { | |||
| 584 | } | 583 | } |
| 585 | 584 | ||
| 586 | /// TCP client compatible with `embedded-nal-async` traits. | 585 | /// TCP client compatible with `embedded-nal-async` traits. |
| 587 | #[cfg(feature = "nightly")] | ||
| 588 | pub mod client { | 586 | pub mod client { |
| 589 | use core::cell::{Cell, UnsafeCell}; | 587 | use core::cell::{Cell, UnsafeCell}; |
| 590 | use core::mem::MaybeUninit; | 588 | use core::mem::MaybeUninit; |
