Recommended a protobuf LUA version of the previous Project client Lua, communication protocol is PROTOBUF, with NetEase Proto-gen-lua, the use of the process encountered some problems need to be around, such as:
1, each change, add proto to generate new files, code scale explosion
2, because Lua itself, each file maximum file within the global local variable can not exceed 200, so when the proto scale is too large, the generated
Lua files are not available, you need to split the proto
3, I do Proto-gen-lua integration, as if the use of protobuf2.5, forced to use only 2.4, and then proto in the message
Format support is not complete, such as the message contains other message is not possible, but only to include the message definition to write
Inside the message
Recent new projects, want to study the next protobuf dynamic analysis, so on GitHub found this project:
Https://github.com/zhanjunxiong/luapb
Project in the first integration of PROTOBUF, and then put this LUAPB CPP file also added, LUAPB this project Singleton.h is not a cross-flat
, you can modify the code for a single example, and then you can use the
These days of frustrating time encountered some bugs, to the author after the author quickly repaired, specific usage, you can refer to the project Test example, can also go to
Issue list to see:
Https://github.com/zhanjunxiong/luapb/issues/2
Protobuf's LUA version