Open Cre3per opened 1 month ago
I'd like to work on this issue
Implementation idea
--emit-language=[cpp,c]
generator_t
Using libraries and a package maneger increases the build complexity of the project, but the CLI parser can also be used for other options (e.g. to set the game path, and output directory), and having a package manager could make it easier to implement future features.
Conan works on Windows/Mac/Linux and can automatically build libraries from source if no prebuilt binaries are available. New build steps would be
conan install --output-folder build --settings:host build_type=Release .
cmake -S . -B build --preset conan-debug -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DSOURCE2GEN_GAME=CS2
cmake --build build
I don't know if conan is compatible with premake. Why does source2gen use multiple build systems anyway?
Reply by @es3n1n in https://github.com/neverlosecc/source2sdk/issues/23#issuecomment-2241767113
Very nice idea, you can start working on this and we'll be more than happy to merge this, however probably I should first finish my work on https://github.com/neverlosecc/source2gen/pull/47 (been busy with other stuff, hopefully I can find some free time to work on it 🤞)
Everything from that list sounds awesome, as for the premake - premake is just a legacy stuff we used before so its pretty much a leftover. Feel free to remove it, without doing it scaling the project further would be really painful.
I will close this issue here, please reopen it in https://github.com/neverlosecc/source2gen
In addition to C++.
The goal is to support more languages, and many languages have binding generators that consume C.
If it turns out the generated bindings are not user-friendly, we can implement language-specific generators later on.
Usage example