Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update native image generation section in GraalPy Micronaut/Spring Boot guides #2

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions graalpy/graalpy-custom-venv-guide/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Using Custom GraalPy Virtual Environment in a Java Application

While GraalPy provides a [python-embedding](https://central.sonatype.com/artifact/org.graalvm.python/python-embedding) package and GraalPy [Maven plugin](https://www.graalvm.org/latest/reference-manual/python/Embedding-Build-Tools/) simplify the required setup to ship Python packages
as Java resources or in separate folders, sometimes users may want to install the Python packages manually
While GraalPy provides a [python-embedding](https://central.sonatype.com/artifact/org.graalvm.python/python-embedding) package and GraalPy [Maven plugin](https://www.graalvm.org/latest/reference-manual/python/Embedding-Build-Tools/) to simplify the required setup to ship Python packages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While GraalPy provides a python-embedding package and GraalPy Maven plugin to simplify the required setup to ship Python packages as Java resources or in separate folders, sometimes developers may want to install the Python packages manually
using the GraalPy standalone distribution, and then use these manually installed packages in Java.

as Java resources or in separate folders, sometimes developers may want to install the Python packages manually
using the GraalPy standalone distribution and then use the manually installed packages in Java.

This approach requires more effort, but may be useful in the following scenarios:
Expand Down Expand Up @@ -180,7 +180,7 @@ If you followed along with the example, you can now compile and run your applica
```

Make sure to replace the `/path/to/myvenv` with the actual path where you created
the virtual filesystem on your system.
the virtual environment on your system.

## 6. Next steps

Expand Down
6 changes: 5 additions & 1 deletion graalpy/graalpy-micronaut-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@ This will start the application on port 8080.

## 7. GraalVM Native Executable

*Note: Generating GraalVM native executable of Java applications that make use of Graal languages and virtual threads
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Generating GraalVM native executables of Java applications that make use of Graal languages and virtual threads at the same time is supported only on GraalVM for JDK 23 and later. Notably, virtual threads support is unconditionally reachable in Micronaut framework and therefore this applies also to our example.

at the same time is supported only on GraalVM JDK 23+. Notably, virtual threads support is unconditionally reachable
in Micronaut framework and therefore this applies also to our example.*

### 7.1. Native Executable metadata

The [GraalVM](https://www.graalvm.org/) Native Image compilation requires metadata to properly run code that uses [dynamic proxies](https://www.graalvm.org/latest/reference-manual/native-image/metadata/#dynamic-proxy).
Expand Down Expand Up @@ -470,7 +474,7 @@ To generate a native executable using Maven, run:
The native executable is created in the `target` directory and can be run with:

```bash
./target/demo
./target/graalpy-micronaut
```

## 8. Next steps
Expand Down
2 changes: 1 addition & 1 deletion graalpy/graalpy-spring-boot-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ To generate a native executable using Maven, run:
The native executable is created in the `target` directory and can be run with:

```bash
./target/demo
./target/graalpy-springboot
```

## 8. Next steps
Expand Down