Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1.5 KiB

Ahead Of Time (AOT) compilation for the Java Virtual Machine (JVM)

Ahead Of Time (AOT) compilation build tools such as those provided by GraalVM's native-image can require some configuration when using protobuf. Protobuf for the JVM uses reflection, and some of its target classes are not possible to determine in advance. This situation is unlikely to change.

The Lite version of protobuf for the JVM avoids reflection and may be better suited for use with AOT compilation tooling. This Lite version was originally targeted for use on Android which has similar AOT compilation goals as GraalVM's native-image tool.

GraalVM native-image

The GraalVM native-image tool can be configured with options for the
Java Native Interface (JNI), http proxying, reflection, and other resources. While these configuration options can be manually specified in JSON files, we recommend that you exercise the application with the assisted configuration agent. The agent will generate native-image.properties files that you add to the project's META-INF/native-image/ directory. The Native Image builder uses configuration options provided in META-INF/native-image/ to construct native-image command line arguments.