Hybrid Projects | Using SLC
Last updated
Last updated
One of the major things we have already gone over is what the hell even is SLC. SLC as mentioned is SkyLine's Configuration Language or otherwise known as the "project management" engine. This engine not only validates internal and external SkyLine modification scripts but can even generate entire setups and projects for you that can make it nice and easy for you to get snug with development. One prime aspect of SLC is that it can even auto generate hybrid developed projects. Now as we mentioned, the hybrid development is just writing a program that can call C++ code from C and then calling it inside of Go code before fully compiling it down to a .so file that can be imported using golang's native plugin system. But, sometimes writing and developing an entire wrapper yourself can be daunting. Anytime you want to just run the command
skyline --Generate
and by then if you loaded the correct information you should easily be able to see the generated code / module and projects directory. The directory will automatically fill with skyline scripts, a pre generated makefile for compiling and linking binaries, generating wrappers, C++ and C files for wrapping, Go code for templating and compiling it down to a .so file while also giving you a whole set of default configurations within the language.
The image above is a tree for all of the programs that are generated when running that command.
but what about the file for loading configurations? Well in order to load a hybrid project, SLC needs to know what your project information is and its goal. So the JSON file to load for configuration will look like the following.
The file basically speaks for itself.
--> Project Name: Will specify the directories / project name
--> Hybrid-Wrap?: Will tell the engine to generate a hybrid wrapper if true
--> UsingSLModifiers?: Will tell the engine to generate .slmod files if true
--> UsingJsonData?: Will tell the engine to generate conf / require files if true
--> UsingEngine?: Will tell SLC/Engine to generate conf if true / ENGINE call to json
--> UsingMakefile?: Will tell SLC/Engine to generate a valid Makefile if true for linking
--> DesignatedPath?: Will tell the engine where to generate the project
Note:
{ProjectName}
is a variable when the JSON will be parsed any variable that is a string within that file will be replaced and that will be the designated output for the generation.