Skip to content

Commit 0f5eb4b

Browse files
committed
Added support for polyglot isolates for specific platform.
1 parent dda1813 commit 0f5eb4b

File tree

2 files changed

+87
-2
lines changed

2 files changed

+87
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Download Maven or import as Maven project into your IDE.
2222
* `mvn -Pnative package` to build a native-image
2323
* `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.
2424
* `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.
25+
* `mvn -Pisolated package` to install native isolate versions of languages for the current platform
2526

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

pom.xml

+86-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
4545
Switch to community licenses by adding a `-community` suffix to the artefact id (e.g. `js-communtiy`).
4646
Switch to native isolate versions of languages by adding a `-isolate` suffix. (`js-isolate`).
47+
Since Polyglot version 24.1, native isolate versions of languages for specific platforms are supported.
48+
Refer to the `isolate` profiles for instructions on how to activate them.
4749
4850
Any dependency in the org.graalvm.polyglot group is intended for use by polyglot embeddings.
4951
-->
@@ -401,8 +403,90 @@
401403
</plugins>
402404
</build>
403405
</profile>
406+
<!--
407+
Profiles for using a native isolate versions of languages for a specific platform.
408+
Native isolate versions of languages for a specific platforms are supported since
409+
Polyglot version 24.1 for JavaScript (js) and Python (python).
410+
These profiles may be removed if you are not using native isolate versions of languages.
411+
-->
412+
<!-- Linux AMD64 -->
413+
<profile>
414+
<id>isolate-linux-amd64</id>
415+
<activation>
416+
<os>
417+
<family>unix</family>
418+
<name>linux</name>
419+
<arch>amd64</arch>
420+
</os>
421+
</activation>
422+
<properties>
423+
<isolate.platform>linux-amd64</isolate.platform>
424+
</properties>
425+
</profile>
426+
<!-- Linux AARCH64 -->
427+
<profile>
428+
<id>isolate-linux-aarch64</id>
429+
<activation>
430+
<os>
431+
<family>unix</family>
432+
<name>linux</name>
433+
<arch>aarch64</arch>
434+
</os>
435+
</activation>
436+
<properties>
437+
<isolate.platform>linux-aarch64</isolate.platform>
438+
</properties>
439+
</profile>
440+
<!-- macOS AMD64 -->
441+
<profile>
442+
<id>isolate-darwin-amd64</id>
443+
<activation>
444+
<os>
445+
<family>mac</family>
446+
<arch>x86_64</arch>
447+
</os>
448+
</activation>
449+
<properties>
450+
<isolate.platform>darwin-amd64</isolate.platform>
451+
</properties>
452+
</profile>
453+
<!-- macOS AARCH64 -->
454+
<profile>
455+
<id>isolate-darwin-aarch64</id>
456+
<activation>
457+
<os>
458+
<family>mac</family>
459+
<arch>aarch64</arch>
460+
</os>
461+
</activation>
462+
<properties>
463+
<isolate.platform>darwin-aarch64</isolate.platform>
464+
</properties>
465+
</profile>
466+
<!-- Windows AMD64 -->
467+
<profile>
468+
<id>isolate-windows-amd64</id>
469+
<activation>
470+
<os>
471+
<family>windows</family>
472+
<arch>x86_64</arch>
473+
</os>
474+
</activation>
475+
<properties>
476+
<isolate.platform>windows-amd64</isolate.platform>
477+
</properties>
478+
</profile>
479+
<profile>
480+
<id>isolated</id>
481+
<dependencies>
482+
<dependency>
483+
<groupId>org.graalvm.polyglot</groupId>
484+
<artifactId>js-isolate-${isolate.platform}</artifactId>
485+
<version>${graalvm.version}</version>
486+
<type>pom</type>
487+
</dependency>
488+
</dependencies>
489+
</profile>
404490
</profiles>
405491

406492
</project>
407-
408-

0 commit comments

Comments
 (0)