Is it possible to program to web with Lua?

Asked

Viewed 1,943 times

12

I see many tutorials on the Internet that assimilate the use of language Lua to the development of games.

But I’d like to know the following:

  • It is possible to develop for web using the language Lua?

  • Is there a framework that can make this possible?

5 answers

13


No doubt, any language can. Even if there were some difficulty in the current ecosystem, and it is good to make it clear that it does not, it could be extended with C to give this capacity. Of course, it doesn’t have everything as ready as PHP or other languages. They don’t exist frameworks as complete as these other languages (which may be an advantage), but has something ready.

See the Lua module for Apache.

Module for Ngnix.

Extension to OSI.

Access by CGI.

Kepler is a mature project for this purpose.

Orbit is a framework MVC.

Sailor is another.

There are several others.

Tutorial.

13

Yes. is not a very mature ecosystem, but there are options for web frameworks in Lua:

Lapis and Sailor look more advanced and robust, plus newer and updated.

5

Yes it is possible.

You can use the Orbit, it is a MVC framework for the web.

3

Yes! List of frameworks by category:

Microframework: Lapis

MVC: Sailor, Orbit

Event-driven: Luvit, Turbolua

CMS, Wikis and others: Ophal, Luapress, Sputnik, Tir, Lusty, Moonstalk, Webmcp, Mercury, Vanilla, Gimlet Cocktail, Bamboo

On the Moon.Space I did a post with re-views of several of these: http://lua.space/webdev/the-best-lua-web-frameworks

(I wanted to have posted the url for each framework here but my reputation in stackoverflow does not leave more than 2 for now :( )

1

Answer to the primary question:

If Lua is inside a string it can be interpreted and transformed into Abstract syntax Tree, then the code tree can be transformed into a string that presents functional code for Javascript/HTML5. So, yes. It is possible.

Tools for converting Lua to interpreted Web languages would go through this:

Text (Lua) > Interpreting & tree generation > Compilation for Web

  • I believe...

Currently there is already parser for Lua which returns to Abstract syntax Tree of the text. You can find on Github or by searching through the search pages through Google.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.