mphe/GDNative-Ropesim

Web Export Support

Closed this issue · 1 comments

Hi, I was using your addon and it worked great, until I tried using it in my web export and it resulted in the following error message:

No suitable library found for GDExtension: res://addons/ropesim/libropesim.gdextension. Possible feature flags for your platform: web, s3tc, wasm32, template, debug, template_debug

My game still ran but just with the ropes non-existent. I tried building my own library with the template for web into wasm files and I added these lines into the gdextension file:

web.debug.wasm = "res://addons/ropesim/bin/libropesim.web.template_debug.wasm32.a"
web.release.wasm = "res://addons/ropesim/bin/libropesim.web.template_release.wasm32.a"

But it still didn't work, so I was wondering if there will be any support for web or if its just a limitation of the Godot engine.

mphe commented

According to the docs, "The default export templates do not include GDExtension support for performance and compatibility reasons".
For GDExtension support, Godot has to be compiled with dlink_enabled=yes.

In that regard, I'm not sure whether it is 1) useful and 2) sensible to provide a web build of this plugin.
It is easy to add a web build to the Github build workflow, but I think it causes more confusion than benefit.
Also I'm not really interested in testing and maintaining web compatibility.

You can try compiling a Godot version with web GDExtension support enabled and report back how well the plugin works with it.
If there is nothing broken and the performance is reasonable, I will add a web build to the workflow. Otherwise, I will close this as not planned/supported.