is it possible to create a different luaState?

Using the Android Corona Enterprise, we have a luaState that is provided by the Corona Framework. 

I would like to know if there is a way to create a new luaState that could access our lua code.

I tried to create a empty luaState and then open my lua file (which after compilation is with the compiled .lu extension) and pass the file content to the l_uaState.load_ function and then do a luaState.getGlobal and finally do my luaState.call  but it didn’t work (it says that opened the file, but when I try to do a luaState.call to execute one of the functions that is defined in that file I get a nil error).

After some digging, it appears that the Corona Frameworks loads the Lua code that is inside the resource.car, but couldn’t replicate that loading.

Thanks,

You have access to the entire Lua API so you can do anything you want though loading code from the resource.car isn’t something we explicitly support (we don’t prevent it but I haven’t tried it in the context of an Enterprise app so I’m not sure where the pitfalls are).  Have you tried loading your code with luaL_loadfile() and proceeding from there?

What are you trying to achieve?  Which platform are you on?

You have access to the entire Lua API so you can do anything you want though loading code from the resource.car isn’t something we explicitly support (we don’t prevent it but I haven’t tried it in the context of an Enterprise app so I’m not sure where the pitfalls are).  Have you tried loading your code with luaL_loadfile() and proceeding from there?

What are you trying to achieve?  Which platform are you on?