Hello, I've searched for this information but could not found any. I know that phonegap/cordova uses a webview to do cross-platform support and Xamarin uses mono. But how Corona does it cross-platform support?
How Corona does cross-platform?
Mar 15 2017 03:36 AM
Corona uses a language called Lua which is available more many different platforms. On top of that we use OpenGL a technology available almost everywhere to perform our screen updates. Then we have a native layer on top to make it all work on the various platforms that we support.
Our build process has been programmed to output .APK's for Android, .EXE's for Windows, .app's for macOS and iOS and so on.
Lua isn't transcoded to other languages. Instead a Lua runtime processes the Lua bytecode and makes calls to native code to do the work. (this is a generalization), the display.newImageRect() function will make a call thru Lua's runtime bridge to code, written in C++ (other things could be in Objective C or Java) that calls the statements to generate a texture object from the passed file name. The texture gets passed back to the Lua side so you can manipulate it.