Is it possible to compile Godot without any game library, only GUI and utilities, for business applications?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By alfredbaudisch

I want to use Godot to make a proof of concept business application, because I like GDScript and I love that I don’t have to use CSS for GUI.

I built the Godot binary following the guide Optimizing a build for size, with some changes, this is what I need:

  • Visual: GUI, SVG, JPG, PNG
  • Implementation: GDScript, Regex, WebSockets and HTTP access

All the rest can be gone.

A simple application with just a button and one scene went from 32MB to 5.80MB with this (plus using UPX). I want to reach 2 MB.

  • Does anyone know what else can I disable when compiling?
  • Any way to disable other game intensive libraries such physics, sprites, animation player, etc?

This is my compile command, for reference. Focus was on tools=no optimize=size use_lto=yes disable_3d=yes.

scons p=windows target=release tools=no optimize=size use_lto=yes disable_3d=yes
module_svg_enabled=yes
module_regex_enabled=yes
module_websocket_enabled=yes
module_arkit_enabled=no
module_assimp_enabled=no
module_bmp_enabled=no
module_bullet_enabled=no
module_camera_enabled=no
module_csg_enabled=no
module_dds_enabled=no
module_enet_enabled=no
module_etc_enabled=no
module_gdnative_enabled=no
module_gridmap_enabled=no
module_hdr_enabled=no
module_jsonrpc_enabled=no
module_mbedtls_enabled=no
module_mobile_vr_enabled=no
module_ogg_enabled=no
module_opensimplex_enabled=no
module_opus_enabled=no
module_pvr_enabled=no
module_recast_enabled=no
module_squish_enabled=no
module_stb_vorbis_enabled=no
module_tga_enabled=no
module_theora_enabled=no
module_tinyexr_enabled=no
module_upnp_enabled=no
module_vhacd_enabled=no
module_visual_script_enabled=no
module_vorbis_enabled=no
module_webm_enabled=no
module_webp_enabled=no
module_webrtc_enabled=no
module_xatlas_unwrap_enabled=no
:bust_in_silhouette: Reply From: alfredbaudisch

Answer from Calinou (Godot contributor) in Reddit:

Right now, there’s no way to remove the Godot physics engine or a specific renderer from the compiled binary.