Searching for Nodejs compiler
Is node.js pretty much just a JavaScript compiler outside of the browser?
Are there any projects that compile JS to machine code?
Backend web compiler
You dont even gave to do that. Many compilers can be compiled to wasm and run directly in the browser, including c++, rust, zig, c#, and typescript is already JavaScript.
Using in memory file systems and js interop wasm can read right virtual in memory files that you then put in index db.
You can build an interactive development environment with builds that runs entirely in the browser on the user's hardware with no backing server and nothing but a content delivery network or static file web server.
However, executing the code would require a server. For that I would design a desktop environment that uses podman containers or something that users can download and work with the environment. Id design that as an electron app so its always up to date when opened.
More on reddit.comCan I use npm packages in the online compiler?
What is a JavaScript compiler?
Does the JavaScript compiler work offline?
Videos
I'm developing an application that should run without the user having node installed. I found compilers like pkg and nexe, which work great, but they don't really compile. Afaik they just wrap the code in a whole node installation. This means that ever code compiled by nexe is at least 50 mb or so (pkg got it down to 38 or so, but still big and I think less supported). Is there a true nodejs compiler? It can't be that hard to program one, after all someone programmed nodejs which is just a live compiler. Are there just to few people who want this?
The purpose of node.js is to run JavaScript code outside of a browser right? And it does that by including the same javascript compiler that every modern browser has?