Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
esp-net-easy
no_std asynchronous abstraction that simplifies Wi-Fi setup and network
stack startup on ESP32 chips using the Hazard3
RISC-V ecosystem.
This crate packages the setup needed to start a Wi-Fi station with a static IPv4 address: network stack configuration, static stack storage and packet pool resources, and background task execution.
Target versions
| Package | Version |
|---|---|
esp-hal |
1.1 |
esp-radio |
0.18 |
esp-rtos |
0.3 |
hazard3-executor |
0.1.2 |
hazard3-net-async |
0.3.1 |
hazard3-time |
0.1.3 |
heapless |
0.9 |
The dependencies use crate aliases retained by Hazard3:
= { = "hazard3-executor", = "0.1.2" }
= { = "hazard3-net-async", = "0.3.1" }
= { = "hazard3-time", = "0.1.3" }
Rust imports such as embassy_executor, embassy_net, and embassy_time remain valid because Hazard3 preserves the upstream crate names, though hazard3-net-async exposes its own stack/pool/runner types rather than a drop-in identical embassy-net API.
ESP radio initialization
Since esp-radio 0.18, esp_radio::init() and esp_radio::Controller no longer exist. The radio controller is initialized by esp_radio::wifi::new, which takes the HAL WIFI peripheral directly. Therefore, init_esp_net_easy does not need a separate radio-controller argument.
Application requirements
The application remains responsible for starting the ESP timer/runtime with esp_rtos::start, because it needs exclusive ownership of a hardware timer.
Installation
Add the crate to your Cargo.toml:
[]
= "1.0.0"
Enable the feature matching the target chip (esp32, esp32c3, esp32c6, or esp32s3):
= { = "1.0.0", = ["esp32c3"] }
Usage example
use Spawner;
use CpuClock;
use TimerGroup;
use ;
async !
Internal operation
esp-radioinitializes the controller and station interface from the application-providedWIFIperipheral.- The static IPv4 address,
/24network mask, gateway, and optional DNS server are parsed and prepared for the interface configuration. - The ESP32 hardware RNG generates a 64-bit seed for the network stack.
- Static
StackStorageand packet pool resources are allocated throughstatic_cell. - Hazard3-compatible background tasks are spawned:
net_taskruns the network stack runner.wifi_connection_taskconfigures station mode, connects, waits for disconnection, and reconnects automatically.
- The function returns the initialized stack.
Known limitations
- Only Wi-Fi Station mode with static IPv4 is supported.
- DHCP, Access Point mode, and IPv6 are not currently implemented.
- The subnet mask is fixed at
/24. ssid,password,static_ip, andgateway_ipmust be&'static str.- Invalid SSID or IP values may panic; this is intended for fixed startup configuration.
License
GPL-2.0-or-later
Copyright (C) 2026 Jorge Andre Castro