1 unstable release

0.1.0 Sep 22, 2020

#11 in #esp8266

Download history 8/week @ 2024-01-08 3/week @ 2024-01-15 9/week @ 2024-02-12 24/week @ 2024-02-19 31/week @ 2024-02-26 22/week @ 2024-03-04 26/week @ 2024-03-11 21/week @ 2024-03-18 33/week @ 2024-03-25 51/week @ 2024-04-01 20/week @ 2024-04-08 22/week @ 2024-04-15

127 downloads per month
Used in 2 crates (via esp8266-hal)


291 lines


⚠️ NOTE this HAL is deprecated, no further development is planned.

An experimental hardware abstraction layer for the ESP8266 written in Rust.

Join in on the discussion: https://matrix.to/#/#esp-rs:matrix.org!

An example project using the crate can be found here.

Setting up the compiler

In order to build Rust for the Xtensa architecture, you must use the esp-rs/rust compiler fork.

This can be installed via the installation scripts and pre-built artifacts found in the esp-rs/rust-build repository. Alternatively, you can build and install the compiler from source.

For more information relating to the Rust compiler fork please refer to the Installing Rust section of The Rust on ESP Book.

Using the Installation Scripts


$ curl -LO https://raw.githubusercontent.com/esp-rs/rust-build/main/install-rust-toolchain.sh
$ chmod +x install-rust-toolchain.sh
$ ./install-rust-toolchain.sh


PS> Invoke-WebRequest https://raw.githubusercontent.com/esp-rs/rust-build/main/Install-RustToolchain.ps1 -OutFile Install-RustToolchain.ps1
PS> .\Install-RustToolchain.ps1

Rust with Podman

Alternatively you might build the project in the container where image already contains pre-installed Rust and ESP-IDF.

$ podman run --device /dev/ttyUSB0 -it docker.io/espressif/idf-rust

This container is lacking the utilities for the ESP8266, but you can install them using these instructions inside the container:

$ apt update && apt install gcc-xtensa-lx106 binutils-xtensa-lx106

Flashing the examples

Once you have the Rust compiler fork installed you can flash the examples using cargo-espflash:

$ cargo install cargo-espflash
$ cargo espflash --release --example blinky /dev/ttyUSB0


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


Internal implementation details of esp8266-hal`.

Do not use this crate directly.


[ ] Checking of all called functions and data are in ram [ ] Automatic checking of 0 init and then use .bss segment


~41K SLoC