I'm working on a project that uses gRPC and I want to compile it with GraalVM's native-image for better performance and smaller memory footprint.
I have tried to use native-image directly, but there are a lot of problems with class initialisation. I understand that there might be some specific configurations or steps that I need to take before I can successfully compile my gRPC code with native-image.
Here are some specific areas where I'm looking for guidance:
- Are there any specific gRPC features or APIs that are not compatible with native-image?
- Do I need to provide any additional configuration files (like reflection configuration) for native-image (Also, I used the shaded plugin to change the location of the grpc package. Might this have an effect on the configuration?)
- Are there any known issues or limitations that I should be aware of when using gRPC with native-image?
- Are there any best practices or tips?
What are the relevant resources?