GraalVM
========================
GraalVM 是一个高性能的虚拟机,它使用 LLVM 作为其即时编译器,并且支持多种编程语言,包括 Java、JavaScript、Python 等。
GraalVM 的主要特点包括:
1. 即时编译:GraalVM 使用 LLVM 作为其即时编译器,可以显著提高程序的执行效率。
2. 多语言支持:GraalVM 支持多种编程语言,包括 Java、JavaScript、Python 等。
3. 高性能:GraalVM 的即时编译器可以显著提高程序的执行效率,并且支持多种编程语言。
官方文档链接:https://www.graalvm.org/latest/docs/
GraalVM 的安装
-----------------------------------------------------
略
Native Image
-----------------------------------------------------
构建共享库
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://www.graalvm.org/latest/reference-manual/native-image/guides/build-native-shared-library/
native-maven-plugin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://graalvm.github.io/native-build-tools/latest/maven-plugin.html
.. code-block:: xml
0.10.6
org.apache.maven.plugins
maven-compiler-plugin
3.12.1
true
org.apache.maven.plugins
maven-jar-plugin
3.4.2
native
org.graalvm.buildtools
native-maven-plugin
${native.maven.plugin.version}
true
build-native
compile-no-fork
package
libfwdj-${project.version}
true
.. code-block:: bash
# 特别注意,一定要用graalvm的jdk。其他jdk不支持native-image的方式构建。
mvn -Dnative clean package