#template-generation #template-tool #esp32

bin+lib esp-generate

Template generation tool to create no_std applications targeting Espressif's chips

11 releases (2 stable)

Uses new Rust 2024

new 1.0.1 Nov 5, 2025
0.6.0 Oct 14, 2025
0.5.0 Jul 16, 2025
0.3.1 Mar 3, 2025
0.2.1 Nov 26, 2024

#41 in Template engine

Download history 464/week @ 2025-07-16 273/week @ 2025-07-23 225/week @ 2025-07-30 247/week @ 2025-08-06 272/week @ 2025-08-13 257/week @ 2025-08-20 261/week @ 2025-08-27 232/week @ 2025-09-03 232/week @ 2025-09-10 317/week @ 2025-09-17 394/week @ 2025-09-24 358/week @ 2025-10-01 425/week @ 2025-10-08 555/week @ 2025-10-15 332/week @ 2025-10-22 378/week @ 2025-10-29

1,739 downloads per month

MIT/Apache

125KB
2K SLoC

esp-generate

Crates.io MSRV Crates.io

Template generation tool to create no_std applications targeting Espressif's line of SoCs and modules.

At present, this template supports the ESP32, ESP32-C2/C3/C6, ESP32-H2, and ESP32-S2/S3. Support for additional devices will be added as they become available.

Quickstart

To generate a project using this template:

  1. Install esp-generate:
cargo install esp-generate --locked

You can also directly download pre-compiled release binaries or use cargo-binstall.

  1. Generate a project. There are two options:

    1. Using the Terminal User Interface (TUI):

      esp-generate
      

      You will be prompted to select a target chip and name for your project, after which you would use TUI to select the other options you need for your project.

    2. Using the Command Line Interface (CLI), adding the options to the esp-generate command:

      esp-generate --chip esp32 -o alloc -o wifi your-project
      

      Use the --headless flag to avoid using the TUI.

      Replace the chip and project name accordingly, and select the desired options using the -o/--option flag. For a full list of available options, see Available Options section of this README.

Available Options

  • unstable-hal: Enables esp-hal features that may not be ready for general use yet.
  • alloc: Enables allocations via the esp-alloc crate.
  • wifi: Enables Wi-Fi via the esp-radio crate; requires alloc.
  • ble-bleps: Enables BLE via the esp-radio crate using bleps; requires alloc, mutually exclusive with ble-trouble.
  • ble-trouble: Enables BLE via the esp-radiocrate using embassy-trouble; requires alloc, mutually exclusive with ble-bleps.
  • embassy: Adds embassy framework support.
  • stack-smashing-protection: Enables stack smashing protection. Requires nightly Rust.
  • probe-rs: Replaces espflash with probe-rs and enables RTT-based options.
  • flashing-probe-rs: Contains options that require probe-rs:
    • defmt: Adds support for defmt printing. Uses rtt-target as the RTT implementation.
    • panic-rtt-target: Uses panic-rtt-target as the panic handler.
    • embedded-test: Enables embedded-test support and generates a simple demo test case.
  • flashing-espflash: Contains options that require espflash:
    • log: Uses the log library to print messages.
    • defmt: Adds support for defmt printing. Uses esp-println and configures espflash to decode defmt logs.
    • esp-backtrace: Uses esp-backtrace as the panic handler.
  • optional: Enables the following set of options:
    • wokwi: Adds support for Wokwi simulation using VS Code Wokwi extension.
    • ci Adds GitHub Actions support with some basics checks.
  • editors: Select the editor integrations:
    • helix: The Helix editor
    • neovim: Neovim
    • vscode: Visual Studio Code
    • zed: The Zed editor

License

Licensed under either of:

at your option.

Contribution

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.

Dependencies

~22–37MB
~523K SLoC