Skip to content

[embind] Initialize embind on wasm workers. #24191

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

Merged
merged 3 commits into from
Apr 29, 2025

Conversation

brendandahl
Copy link
Collaborator

Fixes #24189

@brendandahl brendandahl requested a review from sbc100 April 25, 2025 22:06
@brendandahl brendandahl force-pushed the embind-wasm-workers branch from 72ad89f to ab2ef9f Compare April 25, 2025 22:08
tools/link.py Outdated
@@ -1405,6 +1405,8 @@ def limit_incoming_module_api():

if settings.WASM_WORKERS:
settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE += ['$_wasmWorkerInitializeRuntime']
if settings.EMBIND:
settings.REQUIRED_EXPORTS.append('_embind_initialize_bindings')
Copy link
Collaborator

Choose a reason for hiding this comment

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

These two lines are duplicated in setup_pthreads.

How about moving them to the if EMBIND section on line 1383?

@sbc100
Copy link
Collaborator

sbc100 commented Apr 27, 2025

I spoke to @lindell about #24189 and it sounds like pthreads should work find for their use case. But no harm fixing this I guess?

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.

lgtm % comment

@sbc100 sbc100 enabled auto-merge (squash) April 28, 2025 22:41
@brendandahl brendandahl disabled auto-merge April 29, 2025 16:01
@brendandahl brendandahl merged commit 81054ef into emscripten-core:main Apr 29, 2025
2 of 13 checks passed
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.

Expose Embindings in wasm worker
3 participants