From af6477735717bcb111abff70099d8938c983ed73 Mon Sep 17 00:00:00 2001 From: Stepan Sindelar Date: Wed, 18 Dec 2024 09:37:06 +0100 Subject: [PATCH] Language/style improvements Co-authored-by: Olga Gupalo --- .../micronaut-graalpy-python-package.adoc | 2 +- src/docs/common/snippets/common-graalpy-graalvm.adoc | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/guides/micronaut-graalpy-python-package/micronaut-graalpy-python-package.adoc b/guides/micronaut-graalpy-python-package/micronaut-graalpy-python-package.adoc index d8e68e57fa..28f3f940d4 100644 --- a/guides/micronaut-graalpy-python-package/micronaut-graalpy-python-package.adoc +++ b/guides/micronaut-graalpy-python-package/micronaut-graalpy-python-package.adoc @@ -72,7 +72,7 @@ image::graalpy-pygal.png[] common:graalpy-graalvm.adoc[] -Open `http://localhost:8080/pygal` in a web browser of your choice to execute the +Open http://localhost:8080/pygal[http://localhost:8080/pygal] in your web browser to execute the endpoint exposed by the native executable. You should see a stacked bar chart. endpoint exposed by the native executable. You should see a stacked bar chart. == Next Steps diff --git a/src/docs/common/snippets/common-graalpy-graalvm.adoc b/src/docs/common/snippets/common-graalpy-graalvm.adoc index 9140ab22a1..0c7d1bef22 100644 --- a/src/docs/common/snippets/common-graalpy-graalvm.adoc +++ b/src/docs/common/snippets/common-graalpy-graalvm.adoc @@ -2,8 +2,8 @@ == Python Runtime Compilation -With GraalVM JDK, the Python code executed using the GraalPy engine will be just-in-time compiled. -With other JDKs, the Python code will be interpreted, which negatively impacts its performance. +When using the GraalVM JDK, Python code executed with the GraalPy engine is just-in-time compiled. +With other JDKs, the Python code is interpreted, resulting in reduced performance. The easiest way to install https://www.graalvm.org[GraalVM] on Linux or Mac is to use https://sdkman.io/[SDKMan.io]. @@ -27,7 +27,7 @@ sdk install java 23-graalce === GraalVM JDK Compatibility -In order to support runtime compilation, one must use versions of GraalPy and the Polyglot API +To enable runtime compilation, you must use versions of GraalPy and the Polyglot API dependencies that are compatible with the specified GraalVM JDK version. If you see errors like the following: dependencies compatible with given GraalVM JDK version. If you see errors like this: [source, bash] @@ -47,14 +47,14 @@ org.graalvm.python:graalpy-maven-plugin == Generate a Micronaut Application Native Executable with GraalVM -Starting from the GraalVM for JDK 23, Micronaut applications using GraalPy, or any Truffle language in general, +Starting with GraalVM for JDK 23, Micronaut applications that use GraalPy or any Truffle language can be compiled into native executables using GraalVM Native Image. can be compiled to native executable using GraalVM Native Image. Compiling Micronaut applications ahead of time with GraalVM significantly improves startup time and reduces the memory footprint of JVM-based applications. === Native Executable metadata -The https://www.graalvm.org/[GraalVM] Native Image compilation requires metadata to properly run code that uses https://www.graalvm.org/latest/reference-manual/native-image/metadata/#dynamic-proxy[dynamic proxies]. +GraalVM Native Image compilation requires metadata to correctly run code that uses https://www.graalvm.org/latest/reference-manual/native-image/metadata/#dynamic-proxy[dynamic proxies]. Create a proxy configuration file: resource:META-INF/native-image/proxy-config.json[] @@ -68,4 +68,4 @@ To generate a native executable using Maven, run: ./mvnw package -Dpackaging=native-image ---- -The native executable is created in the `target` directory and can be run with `target/micronautguide`. +The native executable is created in the _target_ directory and can be run with `./target/micronautguide`.