lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



Can Lua run within the real-time kernel?
Does anybody do such a test?

Is it possible to run Lua scripts on the controller for real-time control?
Do you truly want to run it "within" the kernel, or use it for a wrapper around the kernel?

The real time kernels I have worked with are pretty complete and rarely need anything added within the kernel for real time control itself. As someone else pointed out garbage collection will make the kernel non-deterministic. However, you can leave the "hard" real time tasks coded in 'C' while providing a Lua thin wrapper around the kernel API (and other APIs such as network) and thereby support "soft" real time tasks that are written in Lua. A pretty good hybrid solution that I experimented with sometime ago. There are a number of commercial products that use this solution to provide end user programmability on a closed source product.


From: 孙世龙 sunshilong <sunshilong369@gmail.com>
Sent: Tuesday, September 15, 2020 8:39 PM
To: Lua mailing list <lua-l@lists.lua.org>
Subject: Can Lua run within the real-time kernel?
 
Hi,

Can Lua run within the real-time kernel?
Does anybody do such a test?

Is it possible to run Lua scripts on the controller for real-time control?

Best regards
Sunshilong