es4x
es4x copied to clipboard
Native libraries
Hi,
First of all - "Amazing work". This framework is amazing good job.
I have one question: have you tried to wrap/ emulate (like game emulators are doing) the behavior of native Node JS libraries? I think if this will be possible you will unlock about 90% percent of npm libraries. that would be amazing. Projects would just switch to faster alternative.
Note: libraries would need to have modules like "http", "fs"..etc. - actually in my case they are the only I use.
PS. Sorry for my English.
Hi @tahonaPL, thanks for your message!
There have been many requests about adding some shims for node modules, I don't think this would be very complex, I think the major step is to bootstrap a shim, for example, create the skeleton of the fs module. I'm pretty sure that we can delegate all the stuff fs does to either graal or vert.x for whatever is missing.
If you'd be interesting in doing such experiments, I'd gladly support you. I think if we get fs and http (for example) working, then tools like webpack and other bundlers could be used directly.
Other have also mentioned a slightly simpler project, create a small express shim delegating to vertx-web (which is not that different) which would allow us to use the same kind of API...
I think express use http (server) under the hood. I think for express we we would need req, response objects and wrapper on vertx to have same router.
I would switch instantly if those would work.
sadly I'm occupied with different project. But slowly I will be preparing for this. If you have some resources of how to start and eventually where I need to look to adapt to your framework. let me know.