a few days ago, just before we ready to launch our new game to production, but we don’t want to release our lua script as source code, so we try to compile the .lua to its byte code,
but the ScriptEngineProtocol::executeString didn’t work, because of the byte code, is not null-terminated string. I do search in the lua implementation code, lua do support evalutation the bytecode, if we call luaL_loadbuffer with explict byte code length, and then call lua_pcall.
1. why not give an interface in the ScriptEngineProtocol::executeString with code buffer length?
2. if i want do some resource protection deeper, the directly way i found is to hook FileUtil, do some pre / post / file name map etc, but i don’t find an easy way to do this without rewrite the FileUitl implemention.
what’s the author’s solution and conciderations? any suggestions?