lua-users home
lua-l archive

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

Hi, Sunil:

I'm not sure I understand your questions...

Mochalua is just an implementation of the runtime and support libraries - it's written in a plain, vanilla subset of Java compatible with J2ME.  I don't believe there is anything hardware specific about Lua (C or Java implementation) so you should be able to use Mochalua on any Java platform that you could package J2ME compliant code for, just as you could use the C implementation on any platform you can compile it for.  Case in point, the Mochalua math library is implemented 'from scratch' - we don't make use of any vendor supported math toolkit.  Obviously, if you have such a toolkit available you should wrap it in Lua and use it instead for performance reasons, but the one provided with Mochalua is in software and should be able to run on any J2ME device.

Re UI libraries, I think that is outside of the scope of Lua.  We (Groundspeak) have our own UI stuff that we use internally.  We use Lua to drive it - but that's not part of Mochalua.  Really, Mochalua is *just* a port of Lua 5.1.3 and the functions in the reference manual, not any other toolkit.  Pretty much everything that's in the Lua 5.1 reference manual is in Mochalua, but nothing more - if you want Lua to drive your UI toolkit of choice, you'll have to write the glue code yourself.

As for brew, I don't know anything about it.  Since Lua is device independent, if you can run J2ME compliant code under brew then you should be good to go.  You should be able to use Mochalua on any Java enabled platform - Android, Applet, Java desktop application, whatever - just make a new project, copy the codebase over and go.


Hi Patrick,
                       It is nice to see a full lua implementation for j2me. Does it support the following 

1. Device specific issues
2. ANy specific UI libraries such as

Any plans of having a brew version as well ?

Best Regards

On Mon, Nov 17, 2008 at 1:42 PM, Patrick Meehan <> wrote:

Hi, All:

I'd like to announce the release of Mochalua, a J2ME port of the Lua runtime and API, as open source under the MIT license. It is now available for download on the Google Code site:

We were aware of Kahlua but it was incomplete when we started the Mochalua project (and may still be). We were also aware that there was another project locked within the bowels of a short-sighted company. So we put our money toward hiring a company, Nikitova, to work with us to do a conversion from scratch.

Mochalua is a port of the Lua runtime and API only, not the compiler. The API functions have kept their original names and signatures from the C implementation with only minor variations to account for language differences. It has been able to pass the Lua test vectors. We have also put it through its paces for our own projects. At this time, it should be a pretty stable codebase for you to use.

I hope you can make use of this application. If you like it please provide feedback and/or help us optimize the code and improve on what we've done so far.


Patrick Meehan
Senior Developer

Groundspeak, Inc.