Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML5 Exports have the WASM file greater then 25mb. This blocks the usage of CloudFlare Pages and GitHub. #70672

Closed
PeterMarques opened this issue Dec 28, 2022 · 4 comments

Comments

@PeterMarques
Copy link

PeterMarques commented Dec 28, 2022

Godot version

4.0 beta

System information

Browser

Issue description

I know of some sort of hack that compress the wasm file, that was used 5 years ago, but the discussion seen to indicate the method is not the greatest, and is broken on newers versions, so i assume on godot4 it will not work either.

But, i see that the Extensions version of the export, generate TWO wasm files, so, maybe it is feasible to split the engine into smaler files?

Having the HTML5 version to be acepted on several serverless hosting platforms is a must i believe, and even that Godot itself is not reponsible in having that to work (the 25Mb limit of upload), but trying to achieve that compliance can mantain the spread usage of the engine.

And even beyond that, having the option to split the PCK file as well would be very fruitful.
There was instances when i manualy had to export the dependencies in packages and import then on the fly to workarroud.

I am using the version 3 on CloudFlare, and i cant use the version 4 because of that.

Any insights?

Steps to reproduce

Export html5 project on godot4

Minimal reproduction project

N/A

@Zireael07
Copy link
Contributor

duplicate of #68647

@PeterMarques
Copy link
Author

PeterMarques commented Dec 28, 2022

Okay... But, what about the solution of spliting the binary?
In godot 4 there is the option to select parts of the engine to be exported with the project, and that does not seens to be working, at least on HTML5, because the binary size does not change, even if i only let barebone engine selected.

Maybe it is another bug. But it would be a temp fix to complying to size.

And the option to split the WASM bin into several files? Is that feasible, right?

@Zireael07
Copy link
Contributor

Yes, I would like to see the possibility to split the binary, too.

If the export parts doesn't affect the WASM size, that's a bummer, I've been hoping to use that to trim my WASM exports down

@Calinou
Copy link
Member

Calinou commented Dec 29, 2022

Duplicate of #68647.

In godot 4 there is the option to select parts of the engine to be exported with the project, and that does not seens to be working, at least on HTML5, because the binary size does not change, even if i only let barebone engine selected.

You need to compile a custom HTML5 export template for feature build profiles to have any impact on binary size, then specify the path to the custom export template in the export dialog. Otherwise, nothing will happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants