Open Bug 1850627 (wasm-jspi) Opened 8 months ago Updated 2 days ago

Support WebAssembly JS Promise Integration proposal

Categories

(Core :: JavaScript: WebAssembly, enhancement, P1)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: yury, Assigned: yury)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

Add support for the WebAssembly JavaScript-Promise Integration Proposal at https://github.com/WebAssembly/js-promise-integration/blob/main/proposals/js-promise-integration/Overview.md.

Attached file demo_pi.js

Bare minimum to make demo_pi.js work.

Currently there are limitations we need to expect (based on https://v8.dev/blog/jspi):

  • Only JS-to-wasm exports and wasm-to-JS imports are supported.
  • It is not possible for instance to call a re-imported wasm export and suspend when it returns a Promise.
  • Each call to a JSPI export runs on a separate stack. (984kB ?)

Yury, should this be a Meta bug for the Promises proposal?

Severity: -- → N/A
Flags: needinfo?(ydelendik)
Priority: -- → P1

(In reply to Steven DeTar [:sdetar] from comment #4)

Yury, should this be a Meta bug for the Promises proposal?

Yep, we can make this one as a meta bug if one is needed.

Flags: needinfo?(ydelendik)
Attachment #9351813 - Attachment description: WIP: Bug 1850627 - Stack switching WIP. → WIP: Bug 1850627 - Promise integration WIP.
Attachment #9351813 - Attachment is obsolete: true
Attachment #9378059 - Attachment description: WIP: Bug 1850627 - Promise integration WIP, no stackroots manipulations. → WIP: Bug 1850627 - Promise integration WIP.
Attached file demo_pi_new.js
Depends on: 1885982
Depends on: 1886432
Attachment #9378059 - Attachment description: WIP: Bug 1850627 - Promise integration WIP. → Bug 1850627 - Promise integration WIP.
Attachment #9389537 - Attachment description: WIP: Bug 1850627 - New JSPI API prototyping → Bug 1850627 - New JSPI API prototyping
Attachment #9378059 - Attachment description: Bug 1850627 - Promise integration WIP. → WIP: Bug 1850627 - Promise integration WIP.
Attachment #9378059 - Attachment description: WIP: Bug 1850627 - Promise integration WIP. → Bug 1850627 - Wasm JS Promise integration basics.
Attachment #9378059 - Attachment description: Bug 1850627 - Wasm JS Promise integration basics. → Bug 1850627 - Wasm JS Promise integration basics. r=rhunt
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: