-
Hi, I am trying to write a command-line app in Helidon MP using CDI. However, I cannot find any example that does this. Every example is about running rest calls, or other MP features which I do not need for this, just CDI is a requirement. My original application uses Weld SE, but I would like to try out native image with Helidon. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
Anybody? @danielkec @ljnelson my CDI fella? Please? |
Beta Was this translation helpful? Give feedback.
-
Further looking at the Weld |
Beta Was this translation helpful? Give feedback.
-
I have created https://github.com/flowlogix/weld-native which uses GraalVM substitutions and ByteBuddy for non-GraalVM situations to patch Weld the same way Helidon does, but without modifying any code directly or shaded version of Weld. |
Beta Was this translation helpful? Give feedback.
Alright, I found they "key ingredient" Weld needs to be statically initialized at build-time (native image):
This way, no runtime initialization is performed and it works!