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

Packaging Graal VM #472

Closed
rahmanusta opened this issue Jun 13, 2018 · 7 comments
Closed

Packaging Graal VM #472

rahmanusta opened this issue Jun 13, 2018 · 7 comments

Comments

@rahmanusta
Copy link

rahmanusta commented Jun 13, 2018

Hi,

How can I package Graal VM with an application which uses both Java and Ruby ?

Is there any tool like that?

@shelajev
Copy link
Contributor

Do you mean create an executable native image of a polyglot app which uses Java and Ruby? Or just package the whole distribution of GraalVM together with your application?

If the first use-case, I don't have a Java + Ruby example to offer you right now, but you can take a look at the native-list-dir example on the website, where the section "ExtListDir class" talks about building a native image of a Java + JS app.
Note that the Ruby code isn't compiled ahead of time to the native code. Java (and other JVM languages') parts will be, but the rest are JIT compiled during the execution.

If you mean the whole distribution, I have to check about that.

@rahmanusta
Copy link
Author

Hi @shelajev

Actually if I can bundle Java + Ruby together as a native image of a polyglot app, it is enogh for me. I'm thinking to migrate @ AsciidocFx to Graal to be able to use Asciidoctor's Ruby implementation.

However, can I create a native image for a JavaFX application? If I can't I can need to use second option.

@eregon
Copy link
Member

eregon commented Jun 13, 2018

Actually if I can bundle Java + Ruby together as a native image of a polyglot app, it is enogh for me.

Yes, that's possible. You just need to pass --language:ruby to native-image:
$ native-image --language:ruby ... MainJavaClass
and in the Java code you can use Ruby with the Context API.

I don't know if native-image supports JavaFX though.

@shelajev
Copy link
Contributor

I don't think building a native image of the JavaFX will succeed currently. There's some limitations to what programs can be compiled, and I think JavaFX does hit several of them.

@shelajev
Copy link
Contributor

To be 100% honest a while ago I tried building a native image of AsciidocFX specifically and it didn't work. So I'm quite sure it won't work now as well. Currently, we're working on supporting compiling native images of more real world applications.

@rahmanusta
Copy link
Author

Thanks @shelajev. I'll chase the changes about JavaFx.

@cstancu
Copy link
Member

cstancu commented Feb 4, 2019

I'll close this issue as the original question was answered. To get updates about the JavaFX progress you can follow this issue #365. There is no update at this time, but we have moved a long way towards that direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants