A simple demonstration of a self-hosted web interface running on an ESP32-C3, in Rust. Starts a soft access point and a web server running on-device, and serves the bundled single-page app.
This example is intended to be run on the ESP32-C3-DevKitM-1 development board, however should work with any board based on the ESP32-C3 with some minor modifications.
A number of tools are required in order to build and flash this project. Please ensure that each dependency listed below has been properly installed on your system.
Tool | Download |
---|---|
cargo |
https://rustup.rs/ |
npm |
https://nodejs.org/en/ |
cargo espflash |
https://github.com/esp-rs/espflash |
Commands for building and flashing the firmware have been included following the workflow defined by cargo-xtask. Please see the cargo-xtask README for more information.
In order to build the web interface, place the bundled single-page application in the correct location, and subsequently build the firmware, from the root of the repository run:
$ cargo xtask build
With your development board plugged in to your computer via a USB cable, you can then flash the firmware to the board and open a serial monitor when the process has completed:
$ cargo xtask flash
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.