Skip to content

Deprecation of the Lua 5.1 engine and NodeMCU capability enhancements #3144

@TerryE

Description

@TerryE

Related Issue

Background

Currently we can only embed C modules in the firmware binary. @nwf has been developing the concept of hybrid C+Lua modules. @pjsg has raised a concern in #3128 about this increasing the barriers to entry and RAM use for new developers who are unfamiliar with the added complexity of LFS. Both @nwf and @HHHartmann have discussed the concepts for a firmware-embedded LFS partition which would allow use to package C, Lua and C/Lua hybrid modules automatically at build time. The more I consider this, the more I support this general concept as this would allow use to increase the out-of-box capability for new developers.

The rub is that there are technical reasons why this would involve quite a bit of Lua VM runtime changes in the case of the Lua51 VM -- changes which I have already made to the Lua53 VM, which brings us to the policy issue.

When do we deprecate the Lua 5.1 runtime?

At the moment make LUA=53 builds a Lua 5.3 based firmware image and the default make builds a Lua 5.1 image. Both work, but the Lua 5.3 engine is cleaner, faster, and more RAM-efficient. I have already re-implemented the dump/undump LC/IMG file format for Lua53 to facilitate new features such as Nathaniel and Gregor propose.

Back-porting new Lua 5.3 stuff into Lua 5.1 takes effort and introduces extra maintenance overheads. My view is that we need to move to a policy of only offering new VM features within the Lua 5.3 engine and we treat the Lua 5.1 engine as offering continuity options for legacy support. I feel that we need an active consensus on this and this is why I am opening this issue to seek this policy change.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions