-
-
Notifications
You must be signed in to change notification settings - Fork 894
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
Produce a native image using GraalVM #1344
Comments
java$ time echo "Alice->Bob: Hello" | java -jar plantuml-1.2023.4.jar -tpng -pipe > native.png && open native.png
real 0m0,388s
user 0m1,073s
sys 0m0,076s native$ time echo "Alice->Bob: Hello" | ./plantuml-1.2023.4 -tpng -pipe > native.png && open native.png
real 0m0,060s
user 0m0,034s
sys 0m0,029s |
Nice work thank you. I was thinking of it. |
I don't think we need a Docker image but I can open a pull request with a GitHub Action running on |
Yes, that would be great. |
The docker image would help us during development on our computers. Some of us are on Windows, other on macos... We have just started a new repository for every thing related to docker image creation https://github.com/plantuml/docker |
@ggrossetie you can go on the PR for the github workflow and we will see later on the docker image stuff |
Is your feature request related to a problem? Please describe.
I would like to use PlantUML CLI as a native image:
$ echo 'Alice->Bob: Hello' | ./plantuml -tpng -pipe > diagram.png
Describe the solution you'd like
I was able to produce a native image using GraalVM on Ubuntu:
We need to specify a configure directory since PlantUML relies on java.awt.image/JNI.
The configuration can be generated using the following command:
It will run PlantUML with an agent which will record every calls and produce several configuration files in the
native-image-config-dir
directory.I can build the native image on my side but I think it would be great to publish it as part of the release process.
Keep in mind that (currently) it only works for CLI (i.e., the GUI won't show):
It might be possible to make it work but since I'm only interested in the CLI... 😄
Additional context
I can prepare a GitHub Action to demonstrate how to build the native image from a jar file.
The text was updated successfully, but these errors were encountered: