tosca-esp32c3

Crates.iotosca-esp32c3
lib.rstosca-esp32c3
version0.1.1
created_at2026-01-03 23:09:36.078441+00
updated_at2026-01-04 23:02:12.782438+00
descriptionA library for building Tosca firmware that runs on ESP32-C3 boards.
homepage
repositoryhttps://github.com/ToscaLabs/tosca/tree/master/crates/tosca-esp32c3
max_upload_size
id2020909
size212,076
(Luni-4)

documentation

https://docs.rs/tosca-esp32c3

README

tosca-esp32c3

Crates.io Version LICENSE

A library crate for building firmware for tosca devices using an ESP32-C3 microcontroller.

It provides APIs to:

  • Connect a device to a Wi-Fi access point
  • Build the network stack
  • Configure the mDNS-SD discovery service
  • Define events for specific route tasks
  • Initialize and run an HTTP server

The device APIs are designed to guide developers in defining their own devices, aiming to minimize the ambiguities that could arise during firmware development.

Currently, only a light device is implemented as a device. However, this does not prevent the addition of other devices without altering the overall crate structure.

Build Process

To compile this crate with the debug profile, run:

cargo build

To compile this crate with the release profile, which applies all optimizations for faster performance and reduced memory usage, run:

cargo build --release

Build process for firmware devices

The examples directory includes firmware examples built with the tosca-esp32c3 crate. Each example is independent from another and can be moved to a separate repository.

To build a firmware run:

cd examples/[firmware directory name]
cargo build

To flash and run the firmware on an ESP32-C3 board:

cd examples/[firmware directory name]
cargo run --release

[!IMPORTANT] Always use the release profile [--release] when building esp-hal. The dev profile can potentially be one or more orders of magnitude slower than release profile, and may cause issues with timing-sensitive peripherals and/or devices.

Commit count: 0

cargo fmt