Closed derivator closed 2 years ago
@Bromeon I don't use custom-godot
, should I? I'm just rebuilding 3.4.4 with a newer Emscripten, but it's still 3.4.4
@derivator You should only need custom-godot
if the generated API JSON would differ from the one shipped in the godot-rust repo. This is usually the case for other Godot minor versions.
I'm not sure if using Emscripten has an effect here. You could run
godot --gdnative-generate-json-api api.json
and diff the generated file against the api.json
in the godot-rust repo.
godot --gdnative-generate-json-api api.json
I have no idea how I would do that for a wasm build, but I suspect it's fine. It works for me after all :laughing:
@derivator @hoodmane Any more comments before this is merged? 🙂
@Bromeon As far as I can tell at a glance, building Godot shouldn't be necessary anymore with Godot 3.5, as the commit that updates their emscripten version seems to have made it in, but I would still keep that information in the guide, in case the same kind of version mismatch happens in the future. I can try updating the guide this weekend.
@derivator have you had a chance to look at it yet? 🙂
@Bromeon I'm having a look right now. Some steps will not be necessary anymore, however Emscripten makes no ABI stability promises, so while using the export template provided by godot might work coincidentally, I think it's probably best to always compile it yourself. I will update the guide to reflect this.
I have it working with Godot 3.5 following the steps in the guide. I believe -Cpanic=abort
shouldn't be necessary anymore thanks to https://github.com/emscripten-core/emscripten/pull/17328, but I'm still getting errors without it.
Thanks a lot to everyone involved! It's great to finally have a bit more resources on the topic of HTML5 exports ❤️
I was able to run on emscripten 3.1.14, Godot 3.5.1, rust nightly 0.65.0 (2022-09-03). I was unable to run as suggested on the latest versions of rust and emscripten, or even 3.1.21 as in the tutorial. A runtime error came out with similar text:
at: init_library (modules/gdnative/nativescript/nativescript.cpp:1479) - Condition "lib_path.length() == 0" is true.
all because I understood different versions of llvm, so I am puzzled how you could run with the latest version of emscripten, as nightly rust builds still have 15.0, not 16.0.
@Bromeon as discussed in #647 this should cover most of the current problems with HTML5 exports.