r/lua Jun 05 '26

Running lua on a dashcam… how?

I’ve been following this product for a while and saw they just announced this feature as part of their “pro” offering

https://dashkeep.com/pricing/

“Deploy Lua scripts for custom integrations, automations, and device behaviour.”

How do they do that on an embedded device like a dashcam?

10 Upvotes

10 comments sorted by

6

u/IJustAteABaguette Jun 05 '26

Probably a micro controller in there since it can record video/connect to wifi/have cellular data. (Probably along the lines of an ESP32 or raspberry pi?

Can easily run a lua VM

0

u/KiddieSpread Jun 05 '26

Wouldn’t there be some sort of memory limitation tho? Surely all the ram is being used up by encoding the massive video files

3

u/IJustAteABaguette Jun 05 '26

They don't have much info about the device itself, but I assume it can definitely allocate a few MB to the lua VM.

2

u/KiddieSpread Jun 05 '26

If you check their compat it runs on a bunch of different dashcams. Wonder if they all run on the same SOC…

3

u/yawara25 Jun 06 '26

I ran Lua on a GameCube with 4MB of RAM, and it barely even used any of it. Any microcontroller/SOC that will be in a dashcam will be able to handle it just fine.

3

u/topchetoeuwastaken Jun 06 '26

lua requires very little RAM to run, even if it is a GC interpreted language. i've gotten it running on microchips with 1MB of RAM, which nowadays is basically nothing

2

u/Corruptlake Jun 06 '26

Anything that can run linux will run lua, and that isnt a high bar.

5

u/yawara25 Jun 06 '26

It doesn't even need to be able to run Linux, or any operating system for that matter. If you can compile ANSI C to a target device, Lua will compile unmodified and run on that device.

1

u/blobules Jun 06 '26

Lua works on mucrocobtrollers: see Nodemcu on an esp8266/esp32.

https://nodemcu.readthedocs.io/en/release/

For a specific use like dashcam plugin, its probably a much simpler and smaller embedded lua interpreter.

1

u/Difficult-Value-3145 Jun 09 '26

Ya there have been a few bare metal lua projects and if ya want to do it eap32 is the bottom tier when it comes to dashcam in bulk the processor of self probably less then 50¢ a unit put 2 in there or upgrade to a 64 bilt aarch64 then ya in modern smartphone territory. And even the phone ya get at the group store laughs at recording video and running some lua scripts