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

lib: expose setupInstance method on WASI class #57214

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

toyobayashi
Copy link
Contributor

Background: nodejs/help#4102

wasip1-threads requires shared memory imported from host and reuse in child threads, and neither initialize nor start should be called in child threads, but WASI object also need to bind wasm instance and memory in child threads.

My current solution is so tricky without accessing setupInstance:

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/wasi

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. wasi Issues and PRs related to the WebAssembly System Interface. labels Feb 26, 2025
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 90.25%. Comparing base (e03af77) to head (c88140f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/wasi.js 79.16% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57214      +/-   ##
==========================================
- Coverage   90.27%   90.25%   -0.02%     
==========================================
  Files         630      630              
  Lines      184634   184645      +11     
  Branches    36129    36129              
==========================================
- Hits       166674   166649      -25     
- Misses      11009    11023      +14     
- Partials     6951     6973      +22     
Files with missing lines Coverage Δ
lib/wasi.js 95.26% <79.16%> (-2.51%) ⬇️

... and 30 files with indirect coverage changes

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

From a WASI perspective, this approach seems reasonable to me. This has also come up before when comparing Node to other WASI runtimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. wasi Issues and PRs related to the WebAssembly System Interface.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants