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

Node.js builtins #188

Open
guybedford opened this issue Dec 10, 2024 · 3 comments
Open

Node.js builtins #188

guybedford opened this issue Dec 10, 2024 · 3 comments

Comments

@guybedford
Copy link
Contributor

Tracking issue for supporting Node.js builtins (import fs from node:fs, ...), where each builtin can be individually turned on or off.

We should implement this layer in C++ (or Rust), and try to build optimized implementations.

@yoshuawuyts
Copy link
Member

yoshuawuyts commented Jan 16, 2025

I was wondering something you've almost certainly considered: Node.js compat is something I assume other WinterCG implementations would be interested in that too? Is there any work happening on a JS-based shim already? If not, could that potentially serve as a starting point?

@guybedford
Copy link
Contributor Author

A JS-based shim could well be a starting point, although in terms of that being a development blocker often a simple build step can also be used to build in Node.js compatibility just as well.

If someone wanted to work on an entirely inlined JS approach to builtins we could certainly accept those PRs as a start though.

@tschneidereit
Copy link
Member

There are JS-based shims, including browserify, yes. The biggest issue for us is that these often are built in a way that assumes that JS is faster to execute than it is in our environment. Because of that, I think it'd be unfortunate if we invested a large amount of energy into a JS based approach, instead of doing something native

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

No branches or pull requests

3 participants