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

Native libraries #592

Open
tahonaPL opened this issue Jul 15, 2022 · 3 comments
Open

Native libraries #592

tahonaPL opened this issue Jul 15, 2022 · 3 comments

Comments

@tahonaPL
Copy link

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.

@pmlopes
Copy link
Contributor

pmlopes commented Jul 15, 2022

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...

@tahonaPL
Copy link
Author

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.

@tahonaPL
Copy link
Author

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.

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

2 participants