0 votes

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
in Engine by (29 points)

1 Answer

0 votes
Best answer

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.

by (29 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.