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

Support for Node.js http and fs modules in GraalJS #816

Open
wangxi761 opened this issue Apr 15, 2024 · 1 comment
Open

Support for Node.js http and fs modules in GraalJS #816

wangxi761 opened this issue Apr 15, 2024 · 1 comment

Comments

@wangxi761
Copy link

I am reaching out to inquire about the support for Node.js core modules, particularly http and fs, within the GraalJS context. Many npm packages heavily rely on these core modules for various functionalities. However, when embedding GraalJS into a Java application using the Context API, we face limitations that prevent us from leveraging such packages.

Understanding that GraalVM aims to provide a high-performance runtime that supports various languages, the lack of support for these critical Node.js modules means that Java applications cannot fully utilize a vast ecosystem of JavaScript libraries and tools, which naturally limits the potential use cases and inter-operability options.

Are there any plans to add support for these core modules within GraalJS when used in a Java embedded context? If there are technical challenges or design decisions that prevent this support, could you share some insights on the underlying reasons or potential alternatives that you recommend?

@mikehearn
Copy link
Contributor

That's unfortunately not supported, see:

#2 (comment)

But if you'd like to use arbitrary Node modules from Java, you may be interested in

https://mikehearn.github.io/nodejvm/

which is a set of utilities that work with GraalVM+Node to make that easier.

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