godotjs / javascript

Javascript binding for godotengine
https://godotjs.github.io/
MIT License
980 stars 82 forks source link

Javascript module plans #132

Closed Geequlim closed 1 month ago

Geequlim commented 2 years ago

Note These are plans about this project todo but not found enough time to make it happen yet.

About backends and improvements to current workflow

mageowl commented 2 years ago

Also, there are some errors in the godot.d.ts (lines 4686 and 47134, I think), it would be nice to fix them, along with #126.

poohcom1 commented 2 years ago

Also, there are some errors in the godot.d.ts (lines 4686 and 47134, I think), it would be nice to fix them, along with #126.

I've fixed the first issue with #135. @Geequlim could you take a look?

fire commented 2 years ago

Can you estimate the effort to add wasm support? Or describe how you would do it?

Geequlim commented 2 years ago

Can you estimate the effort to add wasm support? Or describe how you would do it?

WASM is supported by V8 directly. For QuickJS backen we can using wasm3

Geequlim commented 2 years ago

For note Latest stable V8 build is ready at https://github.com/Geequlim/v8-builder

Puerts seems integrated nodejs for unity and unreal engine on both desktop and mobile platforms with https://github.com/puerts/backend-nodejs

fire commented 2 years ago

Do you prefer v8 or quickjs + wasm3?

Geequlim commented 2 years ago

For different usage choose different backend. QuickJS is smaller so it is suitable for most game projects.

v8 is large but fast with jit and much more stable with better toolchains including debugger/profiler etc.

We'd better develop games with v8 and publish with your choice.

The principle of the backend to choose is based on your project. If performance more important using V8 or if size is more important choose QuickJS.

Note:

  1. V8 is not supported on Web and quickjs is better for better load time.
  2. On iOS jit is not allowed so performance of V8 is not that obviously so maybe QuickJS is better choice.
  3. For editor and developers tools we'd better choose nodejs so we can benefit from the npm ecosystem to make life easier.
sr229 commented 1 year ago

Heya, @vignetteapp would love to help you out with the GDExtensions work item and (potentially) the CommonJS/ESM implementation, is there any progress in the 4.1 branch so far?

fire commented 1 year ago

The master branch has had active work by @nmerget

nmerget commented 1 month ago

I created a roadmap to track progress