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

packages/browser-node #5

Open
2 tasks
lemanschik opened this issue Dec 10, 2022 · 0 comments
Open
2 tasks

packages/browser-node #5

lemanschik opened this issue Dec 10, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lemanschik
Copy link

lemanschik commented Dec 10, 2022

the browser node package

running nodejs as wasm modules is the right thing to do anyway the most time only fs and net is needed and stdio that are the core interfaces.

  • net
  • fs
  • stdio
  • crypto is in all environments already
  • net is in all environments but not all protocols we need to port from curl

we in fact demonstrated that via the just-js project where v8 builds v8 with its modules independent maybe that can get turned into a wasm build the most things that they did is the network layer over the serviceWorker thats it.

we do not even need that hackish stuff we have directly file system access api and we have direct sockets api both form the links to fs and net.

while fs on linux for example also already leads alone to full network access as every device is a file you can write directly to sockets and devices.

i can supply the needed browser apis to implement vm and such stuff including atomic workers and that.

we run rollup and adapt the result of that as build cache

node -e 'console.log(process.binding("natives"))'

that are node js internals as js strings already formatted as object no need to use the files .

later iterations will replace wasm with the new mksnapshot module format.

@lemanschik lemanschik added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants