but no matter what i do. engine does not load librim.windows.template_release.x86_64.dll. It Always loads librim.windows.template_debug.dev.x86_64.dll.
If I delete librim.windows.template_debug.dev.x86_64.dll then it does not load anything and crashes even though the release version is in same folder.
If you’re running the editor or starting the game from the editor, the debug version will always be used. Release version is used in the exported project and if you force it by starting from command line using --release flag.
Note that you can always just assign the release runtime to windows.debug.x86_* in the gdextension file.
I’ve always found this part frustrating too.
so here’s the way I sort of understand it, godot chooses the most constrained library to attempt loading based on the tags you give it. (there appears to be some automatic detection too but i haven’t read it)
The tags are split and tested against OS::has_feature which checks against a bunch of hard coded tags, and a set of custom tags, which can be added in the debug run configuration as well as the export configuration.
There is a bunch more stuff in there about finding libraries automatically but i haven’t really looked into it that hard.
Once you understand the above, and know where in the source to check the logic, it gets easier to write the exact tags necessary to load any library, or name the library for auto detection.
It’s been a while but i never found a way to extract the list of features from a build, i guess one could create a quick gdscript function with a copy paste of the known features from the source below, among other things.
the shared libraries are not packed into the archive. they need to be placed next to the executable or in a library search path. on windows that automatically includes the directory of the executable, and so long as RPATH is set when compiling(i think thats already done in the scons and cmake) then it will also look in the local directory.
It’s not intrusive at all, a bit hacky perhaps :). You can have two *.gdextension files and swap from a tool script. The engine should hot reload the runtimes automatically.