rust-esp32-std-demo VS esp-idf-template

Compare rust-esp32-std-demo vs esp-idf-template and see what are their differences.

rust-esp32-std-demo

Rust on ESP32 STD demo app. A demo STD binary crate for the ESP32[XX] and ESP-IDF, which connects to WiFi, Ethernet, drives a small HTTP server and draws on a LED screen. (by ivmarkov)

esp-idf-template

A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework. (by esp-rs)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
rust-esp32-std-demo esp-idf-template
16 14
766 338
- 9.5%
6.8 8.6
2 months ago 16 days ago
Rust CMake
Apache License 2.0 -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

rust-esp32-std-demo

Posts with mentions or reviews of rust-esp32-std-demo. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-04.

esp-idf-template

Posts with mentions or reviews of esp-idf-template. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-25.
  • Mabez Rust on Espressif chips – update
    3 projects | news.ycombinator.com | 25 Jan 2024
  • Edge IoT with Rust on ESP: MQTT Subscriber
    1 project | dev.to | 10 Nov 2023
    use anyhow; use embedded_svc::mqtt::client::Event; use embedded_svc::mqtt::client::QoS; use embedded_svc::wifi::{AuthMethod, ClientConfiguration, Configuration}; use esp_idf_hal::peripherals::Peripherals; use esp_idf_svc::eventloop::EspSystemEventLoop; use esp_idf_svc::mqtt::client::{EspMqttClient, MqttClientConfiguration}; use esp_idf_svc::nvs::EspDefaultNvsPartition; use esp_idf_svc::wifi::{BlockingWifi, EspWifi}; use std::{thread::sleep, time::Duration}; fn main() -> anyhow::Result<()> { // It is necessary to call this function once. Otherwise some patches to the runtime // implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71 esp_idf_sys::link_patches(); let peripherals = Peripherals::take().unwrap(); let sysloop = EspSystemEventLoop::take()?; let nvs = EspDefaultNvsPartition::take()?; let mut wifi = BlockingWifi::wrap( EspWifi::new(peripherals.modem, sysloop.clone(), Some(nvs))?, sysloop, )?; wifi.set_configuration(&Configuration::Client(ClientConfiguration { ssid: "SSID".into(), bssid: None, auth_method: AuthMethod::None, password: "PASSWORD".into(), channel: None, }))?; // Start Wifi wifi.start()?; // Connect Wifi wifi.connect()?; // Wait until the network interface is up wifi.wait_netif_up()?; // Print Out Wifi Connection Configuration while !wifi.is_connected().unwrap() { // Get and print connection configuration let config = wifi.get_configuration().unwrap(); println!("Waiting for station {:?}", config); } println!("Wifi Connected"); // Set up handle for MQTT Config let mqtt_config = MqttClientConfiguration::default(); // Create Client Instance and Define Behaviour on Event let mut client = EspMqttClient::new( "mqtt://broker.mqttdashboard.com", &mqtt_config, move |message_event| { match message_event.as_ref().unwrap() { Event::Connected(_) => println!("Connected"), Event::Subscribed(id) => println!("Subscribed to {} id", id), Event::Received(msg) => { if msg.data() != [] { println!("Recieved {}", std::str::from_utf8(msg.data()).unwrap()) } } _ => println!("{:?}", message_event.as_ref().unwrap()), }; }, )?; // Subscribe to MQTT Topic client.subscribe("testtopic/1", QoS::AtLeastOnce)?; loop { // Keep waking up device to avoid watchdog reset sleep(Duration::from_millis(1000)); } }
  • Edge IoT with Rust on ESP: NTP
    1 project | dev.to | 3 Nov 2023
    use anyhow; use chrono::{DateTime, Utc}; use embedded_svc::wifi::{AuthMethod, ClientConfiguration, Configuration}; use esp_idf_hal::delay::FreeRtos; use esp_idf_hal::peripherals::Peripherals; use esp_idf_svc::eventloop::EspSystemEventLoop; use esp_idf_svc::nvs::EspDefaultNvsPartition; use esp_idf_svc::sntp::{EspSntp, SyncStatus}; use esp_idf_svc::wifi::{BlockingWifi, EspWifi}; use std::time::SystemTime; fn main() -> anyhow::Result<()> { // It is necessary to call this function once. Otherwise some patches to the runtime // implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71 esp_idf_sys::link_patches(); let peripherals = Peripherals::take().unwrap(); let sysloop = EspSystemEventLoop::take()?; let nvs = EspDefaultNvsPartition::take()?; let mut wifi = BlockingWifi::wrap( EspWifi::new(peripherals.modem, sysloop.clone(), Some(nvs))?, sysloop, )?; wifi.set_configuration(&Configuration::Client(ClientConfiguration { ssid: "Wokwi-GUEST".into(), bssid: None, auth_method: AuthMethod::None, password: "".into(), channel: None, }))?; // Start Wifi wifi.start()?; // Connect Wifi wifi.connect()?; // Wait until the network interface is up wifi.wait_netif_up()?; // Print Out Wifi Connection Configuration while !wifi.is_connected().unwrap() { // Get and print connection configuration let config = wifi.get_configuration().unwrap(); println!("Waiting for station {:?}", config); } println!("Wifi Connected"); // Create Handle and Configure SNTP let ntp = EspSntp::new_default().unwrap(); // Synchronize NTP println!("Synchronizing with NTP Server"); while ntp.get_sync_status() != SyncStatus::Completed {} println!("Time Sync Completed"); loop { // Obtain System Time let st_now = SystemTime::now(); // Convert to UTC Time let dt_now_utc: DateTime = st_now.clone().into(); // Format Time String let formatted = format!("{}", dt_now_utc.format("%d/%m/%Y %H:%M:%S")); // Print Time println!("{}", formatted); // Delay FreeRtos::delay_ms(1000); } }
  • ESP32 Standard Library Embedded Rust: GPIO Interrupts
    2 projects | dev.to | 7 Sep 2023
    use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use esp_idf_hal::gpio::*; use esp_idf_hal::peripherals::Peripherals; use esp_idf_sys::{self as _}; static FLAG: AtomicBool = AtomicBool::new(false); fn gpio_int_callback() { // Assert FLAG indicating a press button happened FLAG.store(true, Ordering::Relaxed); } fn main() -> ! { // It is necessary to call this function once. Otherwise some patches to the runtime // implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71 esp_idf_sys::link_patches(); // Take Peripherals let dp = Peripherals::take().unwrap(); // Configure button pin as input let mut button = PinDriver::input(dp.pins.gpio0).unwrap(); // Configure button pin with internal pull up button.set_pull(Pull::Up).unwrap(); // Configure button pin to detect interrupts on a positive edge button.set_interrupt_type(InterruptType::PosEdge).unwrap(); // Attach the ISR to the button interrupt unsafe { button.subscribe(gpio_int_callback).unwrap() } // Enable interrupts button.enable_interrupt().unwrap(); // Set up a variable that keeps track of press button count let mut count = 0_u32; loop { // Check if global flag is asserted if FLAG.load(Ordering::Relaxed) { // Reset global flag FLAG.store(false, Ordering::Relaxed); // Update Press count and print count = count.wrapping_add(1); println!("Press Count {}", count); } } }
  • ESP32 Standard Library Embedded Rust: GPIO Control
    5 projects | dev.to | 13 Jul 2023
    use esp_idf_sys as _; // If using the `binstart` feature of `esp-idf-sys`, always keep this module imported use esp_idf_hal::delay::FreeRtos; use esp_idf_hal::gpio::*; use esp_idf_hal::peripherals::Peripherals; fn main() { // It is necessary to call this function once. Otherwise some patches to the runtime // implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71 esp_idf_sys::link_patches(); // Take Peripherals let dp = Peripherals::take().unwrap(); // Configure all LED pins to digital outputs let mut led1 = PinDriver::output(dp.pins.gpio1).unwrap(); let mut led2 = PinDriver::output(dp.pins.gpio10).unwrap(); let mut led3 = PinDriver::output(dp.pins.gpio19).unwrap(); let mut led4 = PinDriver::output(dp.pins.gpio18).unwrap(); let mut led5 = PinDriver::output(dp.pins.gpio4).unwrap(); let mut led6 = PinDriver::output(dp.pins.gpio5).unwrap(); let mut led7 = PinDriver::output(dp.pins.gpio6).unwrap(); let mut led8 = PinDriver::output(dp.pins.gpio7).unwrap(); let mut led9 = PinDriver::output(dp.pins.gpio8).unwrap(); let mut led10 = PinDriver::output(dp.pins.gpio9).unwrap(); // Configure Button pin to input with Pull Up let mut button = PinDriver::input(dp.pins.gpio3).unwrap(); button.set_pull(Pull::Up).unwrap(); // Initialize variable with starting delay let mut blinkdelay = 200_u32; loop { // Algo: // Starting with first LED in sequence // 1. Turn on LED // 2. Retrieve adjusted delay based on button press // 3. Delay with adjusted value // 4. Turn off LED // 5. Delay for 100ms (to make sure LED is turned off) // 6. Repeat steps 1-5 for next LED in sequence // 7. Once all LEDs are done loop back to first LED in sequence // LED 1 led1.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led1.set_low().unwrap(); FreeRtos::delay_ms(100_u32); // LED 2 led2.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led2.set_low().unwrap(); FreeRtos::delay_ms(100_u32); // LED 3 led3.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led3.set_low().unwrap(); FreeRtos::delay_ms(100_u32); // LED 4 led4.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led4.set_low().unwrap(); FreeRtos::delay_ms(100_u32); // LED 5 led5.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led5.set_low().unwrap(); FreeRtos::delay_ms(100_u32); // LED 6 led6.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led6.set_low().unwrap(); FreeRtos::delay_ms(100_u32); // LED 7 led7.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led7.set_low().unwrap(); FreeRtos::delay_ms(100_u32); // LED 8 led8.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led8.set_low().unwrap(); FreeRtos::delay_ms(100_u32); // LED 9 led9.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led9.set_low().unwrap(); FreeRtos::delay_ms(100_u32); // LED 10 led10.set_high().unwrap(); blinkdelay = button_pressed(&button, &blinkdelay); FreeRtos::delay_ms(blinkdelay); led10.set_low().unwrap(); FreeRtos::delay_ms(100_u32); } } fn button_pressed(but: &PinDriver<'_, Gpio3, Input>, del: &u32) -> u32 { // Check if Button has been pressed // If not pressed, return the delay value unchanged if but.is_low() { // if the value of the delay passed is less of equal to 50 then reset it to initial value // else subtract 50 from the passed delay println!("Button Pressed!"); if del <= &50_u32 { return 200_u32; } else { return del - 50_u32; } } else { return *del; } }
  • Embedded Rust on ESP32: compatibility issue with esp_idf_hal and embedded_hal?
    2 projects | /r/rust | 7 May 2023
    fn main() -> anyhow::Result<()> { // It is necessary to call this function once. Otherwise some patches to the runtime // implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71 esp_idf_sys::link_patches(); println!("Hello, world!");
  • Rust on Esp32
    2 projects | /r/rust | 15 Mar 2023
    There is a template for how to use Rust from an idf.py cmake project where you can incrementally add Rust to your project by calling to from C. Instructions for it are at https://github.com/esp-rs/esp-idf-template/blob/master/README-cmake.md
  • ESP32 example project
    3 projects | /r/rust | 7 Mar 2023
    Sorry for the poor way of supporting you, I am currently at the embedded world and I can't try much to reproduce your issue. I just merged: https://github.com/esp-rs/esp-idf-template/pull/84. Which can be what you were facing, can you use the latest template and see if the issue still persists? Let me know how it goes
  • Embedded Rust on ESP32C3 Board, a Hands-on Quickstart Guide
    17 projects | dev.to | 22 Feb 2023
    The awesome ESP IDF Template will save us the pain of configuring a fully functional project ourselves, use it like so:
  • Accessing embedded peripherals from state machine
    3 projects | /r/rust | 11 Jan 2023
    fn main() { // It is necessary to call this function once. Otherwise some patches to the runtime // implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71 esp_idf_sys::link_patches();

What are some alternatives?

When comparing rust-esp32-std-demo and esp-idf-template you can also consider the following projects:

smol - A small and fast async runtime for Rust

espup - Tool for installing and maintaining Espressif Rust ecosystem.

esp-idf-sys - Bindings for ESP-IDF (Espressif's IoT Development Framework)

esp-template - A minimal esp-hal application template for use with cargo-generate

ili9341-rs - A WIP, no_std, generic driver for the ILI9341 (and ILI9340C) TFT LCD display

avr-hal-template - cargo-generate template for avr-hal projects

getrandom - A small cross-platform library to securely get random data (entropy)

template - Template for a generic rust project hosted on GitHub

embassy - Modern embedded framework, using Rust and async.

std-training - Embedded Rust on Espressif training material.

espflash - Serial flasher utility for Espressif SoCs and modules based on esptool.py

templates - Templates for bootstrapping a Rust TUI application with Ratatui