finds.dev← search

// the find

espressif/rust-esp32-example

★ 496 · Rust · MIT · updated Nov 2022

Example of Rust integration into an ESP-IDF project, for ESP32 series of chips

A minimal example showing how to call Rust code from a C-based ESP-IDF project on ESP32-S2 and ESP32-C3. Builds a Rust static library via Cargo and links it into a FreeRTOS task. The repo itself opens with a deprecation notice pointing you elsewhere, which tells you most of what you need to know.

The idf-first approach still has a niche: brownfield ESP-IDF codebases that want to incrementally introduce Rust without rewriting the whole project around cargo. The CMake integration is clean and shows exactly how to wire Cargo into the ESP-IDF build system. Includes platform-specific installation docs for macOS (x86 and ARM), Linux, and Windows, which saves real time when setting up Xtensa toolchains. Container image option (Docker/Podman) sidesteps the notoriously painful ESP-IDF setup.

Espressif themselves deprecated this in favor of the cargo-first approach at esp-rs — the README says so in the first paragraph, so you're learning a pattern the upstream team has abandoned. Last commit was November 2022, so it's running against whatever ESP-IDF and Rust toolchain versions existed then; expect friction with current toolchains. The actual Rust code is trivially small (a single lib.rs), so there's nothing here about allocators, panic handlers, or using esp-hal, which are the hard parts anyone actually hits. No tests.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →