Skip to content

Why WebIDL over EmBind? #3232

Answered by 4ian
arthuro555 asked this question in Archive
Discussion options

You must be logged in to vote

I started with embind, and it turns out to be complicated to use, not super flexible, quite verbose, and because of some magic I think it was not handling properly the shared pointers.
See the commits that actually did the changes 4 years ago: 4ian/GDevelop.js@e654ec3, 4ian/GDevelop.js@3ed1515#diff-3b1a2a3a954dfdd8a93286806c5fd589516db4cd2f2704fbb823482a91cf4bfc

WebIDL might not be "sexy" compared to Embind, but it just works, allows us to generate types, allows us to rename a type (gdObject), works with typedefs, uses a standard syntax (WebIDL), does not require a new .cpp file to compile (just Wrapper.cpp), so overall I'm pretty happy and would use it again I think.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arthuro555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants