How does mgos_timezones_init magically get called?

I was just looking at the timezone configuration module at https://github.com/mamuesp/timezones.

I used it in a test program, and the mgos_timezones_init() function got called automatically at application start.

How does mongoose OS know what entry points to call at application start? What order are they called in?

mgos_deps_init is the function which calls the used libraries init function.
Each library must define a function bool library_name_init(void)
Ref: https://mongoose-os.com/docs/mongoose-os/userguide/build.md#libs

mgos_deps_init is generated by the build process and one can find it in build/gen/mgos_deps_init.c