Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Enable WASM_BIGINT by default #22993

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dschuff
Copy link
Member

@dschuff dschuff commented Nov 22, 2024

Enables by default by temporarily reducing required Safari version.

Also includes bugfixes for WASM_BIGINT compatibility.

Enables by default by temporarily reducing required Safari version.

Also includes bugfixes for WASM_BIGINT compatibility.
@@ -49,7 +49,8 @@ var Module = typeof {{{ EXPORT_NAME }}} != 'undefined' ? {{{ EXPORT_NAME }}} : {
#include "polyfill/objassign.js"
#endif

#if WASM_BIGINT && MIN_SAFARI_VERSION < 150000
#if WASM_BIGINT && MIN_SAFARI_VERSION < 140100
// TODO: Fix this back to 150000
// See https://caniuse.com/mdn-javascript_builtins_bigint64array
#include "polyfill/bigint64array.js"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side note; I wasn't even aware we supported WASM_BIGINT without bigint64array (and I even said so in https://webassembly.org/features/). I don't know how many users we had for this; should we just remove the polyfill and don't support bigint for Safari 14?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess so?

self.assertContained('emcc: error: using 64-bit arguments in EM_JS function without WASM_BIGINT is not yet fully supported: `foo`', err)

self.set_setting('WASM_BIGINT')
self.node_args += shared.node_bigint_flags(self.get_nodejs())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this line should no longer be needed since it will be the default now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test still still executes the first part without bigint and the second part with it, I just use the command line flag instead of set_setting.

tools/feature_matrix.py Outdated Show resolved Hide resolved
tools/link.py Outdated Show resolved Hide resolved
tools/link.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't wait to see this land!

@dschuff
Copy link
Member Author

dschuff commented Nov 22, 2024

This is still WIP and has some tests and/or code under test that needs to be fixed up. I'll ping you again when it's ready or when I need other advice :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants