# Using Lua as ESP-IDF Component with ESP32

DevFeed: [Using Lua as ESP-IDF Component with ESP32](<https://devfeed.tech/articles/using-lua-as-esp-idf-component-with-esp32-13968.md>)

Original publisher: [Read original article](<https://developer.espressif.com/blog/using-lua-as-esp-idf-component-with-esp32/>)

Author: John Lee

Published: 2024-10-22T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Lua](<https://devfeed.tech/topics/lua.md>), [ESP-IDF](<https://devfeed.tech/topics/esp-idf.md>), [ESP32](<https://devfeed.tech/topics/esp32.md>), [Embedded Systems](<https://devfeed.tech/topics/embedded-systems.md>), [Scripting](<https://devfeed.tech/topics/scripting.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [component](<https://devfeed.tech/tags/component.md>), [embedded-systems](<https://devfeed.tech/tags/embedded-systems.md>), [esp-idf](<https://devfeed.tech/tags/esp-idf.md>), [esp32](<https://devfeed.tech/tags/esp32.md>), [esp32-c3](<https://devfeed.tech/tags/esp32-c3.md>), [firmware](<https://devfeed.tech/tags/firmware.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [lua](<https://devfeed.tech/tags/lua.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [risc-v](<https://devfeed.tech/tags/risc-v.md>), [scripting](<https://devfeed.tech/tags/scripting.md>), [spiffs](<https://devfeed.tech/tags/spiffs.md>)

## AI overview

This tutorial explains how to integrate Lua as an ESP-IDF component in ESP32 projects and run Lua scripts from the SPIFFS filesystem. It covers the example project, cross-architecture support for ESP32 and ESP32-C3, configurable Lua stack size, and memory monitoring while Wi-Fi is enabled.

## Source excerpt

Lua is a lightweight and powerful scripting language, making it ideal for use in embedded systems like the ESP32. By integrating Lua into your ESP-IDF project, you can execute scripts directly on the ESP32, offering a flexible way to manage application behavior without recompiling the entire firmware. This guide walks through how to set up Lua as an ESP-IDF component, with a focus on running Lua scripts from the filesystem.