Skip to content

Adding the Rust Coding with AI article. Changing Ricardo Tafas author…#689

Open
rftafas wants to merge 1 commit intoespressif:mainfrom
rftafas:rust-ai-coding
Open

Adding the Rust Coding with AI article. Changing Ricardo Tafas author…#689
rftafas wants to merge 1 commit intoespressif:mainfrom
rftafas:rust-ai-coding

Conversation

@rftafas
Copy link
Copy Markdown
Contributor

@rftafas rftafas commented Mar 30, 2026

📝 Description

Publish date

Expected publish date: 2026-04-xx - April is just fine.

Review process

  • Initiate technical review
    • This item is N/A
    • Add subject matter experts (your team members, experts in the field)
  • Once tech review mostly done, initiate editorial review
    • Add technical editors (@f-hollow, @FBEZ, and/or @pedrominatel)

Checks

  • [y ] Article folder and file names:
    • Folder path is content/blog/YYYY/MM/my-new-article (articles only)
    • Folder and file names have no underscores, spaces, or uppercase letters (My new_article)
  • [ y] New article's YAML frontmatter:
    • Title updated
    • Date matches the format date: 20YY-MM-DD
    • Summary updated
    • Authors added (see Add youself as an author)
    • Tags added
  • Updated article's YAML frontmatter:
    • This item is N/A
    • If article folder is moved or renamed, the field aliases: with a new URL slug is added
    • Date of update is added lastmode: 20YY-MM-DD
  • [y ] Article media files:
    • All images are in .WebP format (see Use WebP for raster images)
    • Images are compressed within 100-300 KB, with a hard limit of ≤ 500 kB
    • Where possible, Hugo shortcodes are used instead of raw HTML for content types unsupported by markdown (see Use additional content types)
  • [ y] Links in articles
    • Make sure all links are valid
    • No links to Google docs present
    • Use a specific ESP-IDF version in links (avoid stable, hard no for latest)
  • [y ] Git history
    • Commits are clean and squashed to the minimum necessary
    • Commit messages follow Conventional Commits format
    • Your feature branch is rebased on main

🔗 Related

🧪 Testing (Hugo)

@pedrominatel pedrominatel added the needs review Needs someone to be assigned to review label Mar 30, 2026
@github-actions
Copy link
Copy Markdown

🎉 A preview for this PR is available at: https://preview-developer.espressif.com/pr689/

Copy link
Copy Markdown
Collaborator

@f-hollow f-hollow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rftafas Thank you for writing this article!

It gave me food for thought. I really enjoyed its conversational style. Pointed out a couple of nitpicks along the way.

Do you plan to create a feature image for the article or should we help you?

Also , please rebase your branch on main to fix PR previews. We introduced some breaking changes to optimize deployment.

featureAsset: "featured.webp"
authors:
- "ricardo-tafas"
summary: "AI assistants are most effective on ESP32 Rust firmware when you supply clear specs, pinned crates, reference implementations (often ESP-IDF C), and a tight verify loop. The article discusses good practices, pitfalls, discipline, and entropy. A brief explanation about the device is also included, along with the repository and all artifacts."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI assistants

You mean AI agents here and in the rest of the article?


### 1.1 Contextualization

Large language models (LLMs) and coding agents can speed up firmware development on Espressif SoCs. That applies to **Rust on bare metal**. The crates `esp-hal` and `esp-radio`, the Embassy project, and many small protocol crates are all there. Yet, we see little adoption of Rust. That includes me. I've recently been learning it, and if pressured to deliver results, I would fall back on the _C_ that I already know; or, depending on the pressure and time available, the Arduino Core for ESP32 framework as well. The same tools I already use, if enhanced by AI, would make me even more productive. But... What about that junior feeling of starting something new? Well... I challenged myself.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Embassy project

Should a link be added?


### 1.2 About Rust in this Challenge

Rust’s compiler catches many errors that would otherwise appear only on device. That pairs well with AI-generated code: you get **fast iteration in the editor** and **strong feedback from `cargo check`**, provided the model stays inside the right ecosystem (`esp-hal` 1.x, although focused for the newer RISC-V, still supports Espressif Xtensa). It is, then, safe to assume that Rust will benefit greatly from this new LLM-oriented coding world.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Rust’s compiler catches many errors that would otherwise appear only on device. That pairs well with AI-generated code: you get **fast iteration in the editor** and **strong feedback from `cargo check`**, provided the model stays inside the right ecosystem (`esp-hal` 1.x, although focused for the newer RISC-V, still supports Espressif Xtensa). It is, then, safe to assume that Rust will benefit greatly from this new LLM-oriented coding world.
Rust’s compiler catches many errors that would otherwise appear only on device. That pairs well with AI-generated code: you get **fast iteration in the editor** and **strong feedback from `cargo check`**, provided the model stays inside the right ecosystem (`esp-hal` 1.x, although focused on the newer RISC-V, still supports Espressif Xtensa). It is, then, safe to assume that Rust will benefit greatly from this new LLM-oriented coding world.


Rust’s compiler catches many errors that would otherwise appear only on device. That pairs well with AI-generated code: you get **fast iteration in the editor** and **strong feedback from `cargo check`**, provided the model stays inside the right ecosystem (`esp-hal` 1.x, although focused for the newer RISC-V, still supports Espressif Xtensa). It is, then, safe to assume that Rust will benefit greatly from this new LLM-oriented coding world.

The ecosystem has reached milestones that make the story easier to explain to both humans and models. And managers. For example, the `esp-hal 1.0` [announcement](https://developer.espressif.com/blog/2025/10/esp-hal-1/) on the Developer's Portal; official and community docs, like the [Rust on ESP Book](https://docs.espressif.com/projects/rust/book/) and the [no_std training](https://docs.espressif.com/projects/rust/no_std-training/), are enough of a foundation for anyone to conclude that yes, it could be used.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The ecosystem has reached milestones that make the story easier to explain to both humans and models. And managers. For example, the `esp-hal 1.0` [announcement](https://developer.espressif.com/blog/2025/10/esp-hal-1/) on the Developer's Portal; official and community docs, like the [Rust on ESP Book](https://docs.espressif.com/projects/rust/book/) and the [no_std training](https://docs.espressif.com/projects/rust/no_std-training/), are enough of a foundation for anyone to conclude that yes, it could be used.
The ecosystem has reached milestones that make the story easier to explain to both humans and models. And managers. For example, the `esp-hal 1.0` [announcement](https://developer.espressif.com/blog/2025/10/esp-hal-1/) on the Developer Portal; official and community docs, like the [Rust on ESP Book](https://docs.espressif.com/projects/rust/book/) and the [no_std training](https://docs.espressif.com/projects/rust/no_std-training/), are enough of a foundation for anyone to conclude that yes, it could be used.


I also used Cursor, but other tools and agents would yield a very similar experience. The rest of this note walks through workflow (how we worked with an AI agent), what can go wrong (including Git as undo and entropy as clutter), what we built, and the documents that kept humans and the model aligned.

I'm going to use the M5 ESP DualKey development kit. It provides enough ready-to-go peripherals. No breadboard this time.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
I'm going to use the M5 ESP DualKey development kit. It provides enough ready-to-go peripherals. No breadboard this time.
I'm going to use the M5Stack ESP DualKey development kit. It provides enough ready-to-go peripherals. No breadboard this time.


### 2.6 Simulation and CI where possible

When graphics or timing interact with hosts, **simulation** plus **automated checks** can shrink debug time. The [Developer Blog](https://developer.espressif.com/blog/) has discussed simulation and AI-assisted debugging in other contexts (e.g. Wokwi-oriented workflows); the same mindset extends to Rust if you invest in reproducible builds and log-based assertions.
Copy link
Copy Markdown
Collaborator

@f-hollow f-hollow Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Developer Blog has ...

You want to refer to any specific articles?


Models behave a lot like tired humans under deadline: they **take shortcuts**, relax **rigid structure** when a quick test “works,” and then **leave that path in place** because nothing failed yet. A throwaway script lands in whatever folder is open; a reference PDF sits next to the binary because that was convenient; the “real” home for specs and sources in the repo map gets ignored as long as the immediate command succeeds.

That is **entropy**; not malice, just path of least resistance. The assistant does not naturally optimize for **global** organization; it optimizes for **local** accessibility and the last green check. Left alone, the tree drifts the same way a shared desk drifts unless someone names folders and enforces them.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
That is **entropy**; not malice, just path of least resistance. The assistant does not naturally optimize for **global** organization; it optimizes for **local** accessibility and the last green check. Left alone, the tree drifts the same way a shared desk drifts unless someone names folders and enforces them.
That is **entropy**; not malice, just the path of least resistance. The assistant does not naturally optimize for **global** organization; it optimizes for **local** accessibility and the last green check. Left alone, the tree drifts the same way a shared desk drifts unless someone names folders and enforces them.

- IoT
- AI Pair Coding
showAuthor: false
featureAsset: "featured.webp"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add featureAsset:. If you have an image, just make sure it has featured in its name and put it alongside index.md.

Comment on lines +5 to +7
- Rust
- IoT
- AI Pair Coding
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took the liberty to replace the tag AI Pair Coding with the more generic AI. To keep the total tag count under control, we recommend only adding new tags if at least 2-3 articles fit it.

Suggested change
- Rust
- IoT
- AI Pair Coding
- how-to
- Rust
- IoT
- AI
- LLM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Needs someone to be assigned to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants