Skip to content

Commit

Permalink
Language/style improvements
Browse files Browse the repository at this point in the history
Co-authored-by: Olga Gupalo <olga.gupalo@oracle.com>
  • Loading branch information
steve-s and olyagpl authored Dec 18, 2024
1 parent f63e701 commit af64777
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/docs/common/snippets/common-graalpy-graalvm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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].

Expand All @@ -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]
Expand All @@ -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[]
Expand All @@ -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`.

0 comments on commit af64777

Please sign in to comment.