# Rust smoltcp as an alternative TCP/IP stack for ESP-IDF

DevFeed: [Rust smoltcp as an alternative TCP/IP stack for ESP-IDF](<https://devfeed.tech/articles/rust-smoltcp-as-an-alternative-tcp-ip-stack-for-esp-idf-13778.md>)

Original publisher: [Read original article](<https://developer.espressif.com/blog/2026/06/rust-smoltcp-network-stack-for-esp-idf/>)

Author: John Lee

Published: 2026-06-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Blog on Developer Portal](<https://devfeed.tech/sources/blog-on-developer-portal.md>)

Topics: [ESP-IDF](<https://devfeed.tech/topics/esp-idf.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [networking](<https://devfeed.tech/topics/networking.md>), [ESP32](<https://devfeed.tech/topics/esp32.md>), [ESP32-P4](<https://devfeed.tech/topics/esp32-p4.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [MQTT](<https://devfeed.tech/topics/mqtt.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [c](<https://devfeed.tech/tags/c.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [esp-idf](<https://devfeed.tech/tags/esp-idf.md>), [esp32-p4](<https://devfeed.tech/tags/esp32-p4.md>), [ethernet](<https://devfeed.tech/tags/ethernet.md>), [firmware](<https://devfeed.tech/tags/firmware.md>), [http](<https://devfeed.tech/tags/http.md>), [http-server](<https://devfeed.tech/tags/http-server.md>), [ipv4](<https://devfeed.tech/tags/ipv4.md>), [ipv6](<https://devfeed.tech/tags/ipv6.md>), [lwip](<https://devfeed.tech/tags/lwip.md>), [mqtt](<https://devfeed.tech/tags/mqtt.md>), [networking](<https://devfeed.tech/tags/networking.md>), [rust](<https://devfeed.tech/tags/rust.md>), [smoltcp](<https://devfeed.tech/tags/smoltcp.md>), [tcp-ip](<https://devfeed.tech/tags/tcp-ip.md>), [tls](<https://devfeed.tech/tags/tls.md>)

## AI overview

This article explains how to run the Rust smoltcp TCP/IP stack as an alternative IPv4/IPv6 data plane under ESP-IDF. It describes a GNU linker --wrap shim that preserves compatibility with ESP-IDF networking components such as esp_http_server, esp-tls and esp-mqtt, along with the single-task poll architecture, measured ESP32-P4 throughput, and known limitations.

## Source excerpt

A set of ESP-IDF components that run the Rust smoltcp stack as the IPv4/IPv6 data plane, while keeping esp_http_server, esp-tls and esp-mqtt working without source changes. This article explains the linker -wrap shim that makes it compatible, the single-task poll architecture, the throughput I measured on an ESP32-P4 (91.15 Mbit/s on a 100 Mbit link), and the limitations to be aware of.