teal-language / tl

The compiler for Teal, a typed dialect of Lua
MIT License
2.03k stars 101 forks source link

Add a way to disable automatically added std declarations #658

Closed ggoraa closed 1 year ago

ggoraa commented 1 year ago

Some systems that embed Lua and can't use a lot of std functionality just drop the thing entirely and make their own thing. One example is the EdgeTX firmware, where Lua only has access to some of the built in libraries, like table and string, while a lot of other functionality was removed for compatibility reasons, and any needed functionality is redefined as their own API. Oh, and some standard libraries even have their API altered. Again, compatibility reasons.

I think it will be good to add an option to disable those declarations, so that it can be made as a custom type declaration file.

hishamhm commented 1 year ago

This is a duplicate of #532, and something I've started looking at!