GML
Usually, a good GML library is split into multiple scripts.
function mylib_something() { // implementation}
function mylib_another_thing() { // implementation}The library also usually expose global enum/macro for configuration.
enum MYLIB_CONFIG { // some config or types}
#macro MYLIB_VERSION "1.0.0"The thing is, exported functions, enums, and macros is always exposed to the global scope if you write it in this way.
And then, you can create the main function(s) by calling the sub functions.
function mylib_main() { // implementation}
function mylib_another_main() { // implementation}