The most daunting aspect of developing binary modules for the server is dealing with the lua stack in order to retrieve, and pass return values to and from c functions. After an afternoon of boredom, I decided to write a library to make this process much easier. As far as i know (i havent actually checked) the name GLib isnt taken so thats what im gonna call it for now.
GLib provides an object oriented interface for the creation of binary modules, It automatically handles the complexity of retrieving function parameters, and sending return values. GLib isnt invasive, so if you still need to play around with the stack, you can.
GLib currently supports the following parameter types:
Booleans
Numbers
Strings
Vectors
Angles
Plans are in motion to add support for passing tables, entities, and other data types.
With this, i hope binary optimization of server code will be much easier to accomplish.
If you want to check it out, you can find the git repo here.
Just download the repo, and open the project file in visual studio. Everything should be set up for you to build the example plugin. An example lua script is also provided to test the example plugin.
Just a side note, due to a bug in Visual Studio 2019, this library will not work. You will need to use Visual Studio 2017 or older.