bytecodealliance / bytecodealliance/jco

Add jco-std NodeJS compat layer for Node24.x & P3

Open
#2,130 0 comments 0 reactions 0 assignees View on GitHub
blocked enhancement feature/nodejs-compat project/jco-std upstream/componentize-js upstream/starlingmonkey wasi-preview3
Dominant language
TypeScript
Stars
1k
Forks
134
Avg merge
11h 13m
Merged PRs (30d)
232

Description

Right now the jco-std node compatibility layer is written against Node 24.X.X (the current LTS, at the latest version), and it would be ideal if we had a version of the compatibility layer that assumed P3 support.

One example of where this is useful is that currently we need to essentially hand back a promise to ensure that P2 components continue running (e.g. after they perform a `server.listen();`) -- this is due to how P3 handles asynchrony, and P3 native shims *should* simply mark the functions being exported as async functions, and StarlingMonkey (well, `componentize-qjs` right now, likely, and `componentize-js` once it's backed by the new `starlingmonkey-ng`) should do the right thing (run the event loop after the function exits) to mimic NodeJS behavior.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the jco-std Node compatibility layer and the code paths handling P2 and P3 asynchronous exports. Compare the current Node 24 behavior with the intended P3 behavior, especially around server.listen() and event-loop handling. Done means a P3-compatible layer exists and its async behavior is validated without requiring the current promise workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript, wasm
Domain
devtools, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.