Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Compile into Native using GraalVM(I would like to compile a XText Project using GraalVM's native image.)
Compile into Native using GraalVM [message #1848281] Fri, 26 November 2021 12:17 Go to next message
Ignacio Soubelet is currently offline Ignacio SoubeletFriend
Messages: 3
Registered: November 2021
Junior Member
Hello,
I have been looking for any post/project/code that use GraalVM's native image to generate, for example, XText language server (IDE project) but without any luck.

This topic is only to ask whether you guys have seen something like that and whether you think it is possible or not, give some of the restrictions native image generator has at the moment.
That info would be really helpful for me before jumping into it, since requires some effort.

Thanks
Re: Compile into Native using GraalVM [message #1848319 is a reply to message #1848281] Sun, 28 November 2021 08:40 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

I don't think that this has ever been done so far, so expect to find no example/code.

In general, I would say this could be possible. The most tricky part will be getting Guice to work on GraalVM. The rest does not look so problematic.

Maybe you try to get a simple application with Guice running before trying this on an Xtext project.
Re: Compile into Native using GraalVM [message #1848336 is a reply to message #1848319] Sun, 28 November 2021 19:46 Go to previous messageGo to next message
Ignacio Soubelet is currently offline Ignacio SoubeletFriend
Messages: 3
Registered: November 2021
Junior Member
Yes, you're right. That was my problem during the first try.
Basically, the problem in Graal's native is reflection in general, however there are workarounds. I've seen some Guice-based projects with Graal's Native but they're really simple and oriented to showcase in articles.
I will try to work on something small and, if I succeed, will share results with you.
Re: Compile into Native using GraalVM [message #1848458 is a reply to message #1848336] Thu, 02 December 2021 17:03 Go to previous messageGo to next message
Ignacio Soubelet is currently offline Ignacio SoubeletFriend
Messages: 3
Registered: November 2021
Junior Member
Just wanted to drop a note here, basically I never reached the point in which Graal's Native gives me problems with Guice.
Basically, I was not even able to solve all the issues with OSGi. In general, the problem with compiling into Native is reflection.
That is why, for example, Spring has a separate set of tools for achieving it more or less automatically, which is still under dev.

Unfortunately, I don't think that this task is possible without rethinking the architecture.
However, if someone reads this and succeeded in the task, please drop a note.

[Updated on: Thu, 02 December 2021 17:07]

Report message to a moderator

Re: Compile into Native using GraalVM [message #1848466 is a reply to message #1848458] Fri, 03 December 2021 07:27 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Thanks for leaving this note. I have thought that the new Guice version would make it possible in principle to work on GraalVM. But as you said, similar efforts are required to tell Graal to handle Guice's reflection like Spring does. This is basically possible, but likely too much for a one person's/one project scope.
Previous Topic:Converting Xtext DSL tests to Junit5
Next Topic:XText project migrating from Eclipse to LSP : No ContentAssist working
Goto Forum:
  


Current Time: Tue Mar 19 11:56:46 GMT 2024

Powered by FUDForum. Page generated in 0.04247 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top