| 107 | } |
| 108 | |
| 109 | void print_web_header() { |
| 110 | // Emscripten. |
| 111 | char *emscripten_version_char = godot_js_emscripten_get_version(); |
| 112 | String emscripten_version = vformat("Emscripten %s", emscripten_version_char); |
| 113 | // `free()` is used here because it's not memory that was allocated by Godot. |
| 114 | free(emscripten_version_char); |
| 115 | |
| 116 | // Build features. |
| 117 | String thread_support = OS::get_singleton()->has_feature("threads") |
| 118 | ? "multi-threaded" |
| 119 | : "single-threaded"; |
| 120 | String extensions_support = OS::get_singleton()->has_feature("web_extensions") |
| 121 | ? "GDExtension support" |
| 122 | : "no GDExtension support"; |
| 123 | |
| 124 | Vector<String> build_configuration = { emscripten_version, thread_support, extensions_support }; |
| 125 | print_line(vformat("Build configuration: %s.", String(", ").join(build_configuration))); |
| 126 | } |
| 127 | |
| 128 | /// When calling main, it is assumed FS is setup and synced. |
| 129 | extern EMSCRIPTEN_KEEPALIVE int godot_web_main(int argc, char *argv[]) { |
no test coverage detected