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

Added support for polyglot isolates for specific platform. #12

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Download Maven or import as Maven project into your IDE.
* `mvn -Pnative package` to build a native-image
* `mvn -Passembly package` to build an uber JAR containing all dependencies using the Maven Assembly Plugin. The resulting JAR can be executed using `java -jar embedding-1.0-SNAPSHOT-jar-with-dependencies.jar`. We do recommend not using shading whenever possible.
* `mvn -Pshade package` to build an uber JAR containing all dependencies using the Maven Shade Plugin. The resulting JAR can be executed using `java -jar embedding-1.0-SNAPSHOT.jar`. We do recommend not using shading whenever possible.
* `mvn -Pisolated package` to install native isolate versions of languages for the current platform

Please see the [pom.xml](./pom.xml) file for further details on the configuration.

Expand Down
88 changes: 86 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@

Switch to community licenses by adding a `-community` suffix to the artefact id (e.g. `js-communtiy`).
Switch to native isolate versions of languages by adding a `-isolate` suffix. (`js-isolate`).
Since Polyglot version 24.1, native isolate versions of languages for specific platforms are supported.
tzezula marked this conversation as resolved.
Show resolved Hide resolved
Refer to the `isolate` profiles for instructions on how to activate them.

Any dependency in the org.graalvm.polyglot group is intended for use by polyglot embeddings.
-->
Expand Down Expand Up @@ -401,8 +403,90 @@
</plugins>
</build>
</profile>
<!--
chumer marked this conversation as resolved.
Show resolved Hide resolved
Profiles for using a native isolate versions of languages for a specific platform.
Native isolate versions of languages for a specific platforms are supported since
tzezula marked this conversation as resolved.
Show resolved Hide resolved
Polyglot version 24.1 for JavaScript (js) and Python (python).
These profiles may be removed if you are not using native isolate versions of languages.
-->
<!-- Linux AMD64 -->
<profile>
<id>isolate-linux-amd64</id>
<activation>
<os>
<family>unix</family>
<name>linux</name>
<arch>amd64</arch>
</os>
</activation>
<properties>
<isolate.platform>linux-amd64</isolate.platform>
</properties>
</profile>
<!-- Linux AARCH64 -->
<profile>
<id>isolate-linux-aarch64</id>
<activation>
<os>
<family>unix</family>
<name>linux</name>
<arch>aarch64</arch>
</os>
</activation>
<properties>
<isolate.platform>linux-aarch64</isolate.platform>
</properties>
</profile>
<!-- macOS AMD64 -->
<profile>
<id>isolate-darwin-amd64</id>
<activation>
<os>
<family>mac</family>
<arch>x86_64</arch>
</os>
</activation>
<properties>
<isolate.platform>darwin-amd64</isolate.platform>
</properties>
</profile>
<!-- macOS AARCH64 -->
<profile>
<id>isolate-darwin-aarch64</id>
<activation>
<os>
<family>mac</family>
<arch>aarch64</arch>
</os>
</activation>
<properties>
<isolate.platform>darwin-aarch64</isolate.platform>
</properties>
</profile>
<!-- Windows AMD64 -->
<profile>
<id>isolate-windows-amd64</id>
<activation>
<os>
<family>windows</family>
<arch>x86_64</arch>
</os>
</activation>
<properties>
<isolate.platform>windows-amd64</isolate.platform>
</properties>
</profile>
<profile>
<id>isolated</id>
<dependencies>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>js-isolate-${isolate.platform}</artifactId>
<version>${graalvm.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</profile>
</profiles>

</project>