Introduce C library for Pkl (#1238)

This uses native-image to generate a C library for Pkl.
This generated library from native-image is wrapped with our own library,
in `pkl.h`.

This produces a static and a dynamic library for each os/arch variant
that Pkl currently supports.

Co-authored-by: Kushal Pisavadia <kushal.p@apple.com>
Co-authored-by: Jen Basch <jbasch94@gmail.com>
Co-authored-by: Islon Scherer <i_desouzascherer@apple.com>
This commit is contained in:
Daniel Chao
2026-07-25 04:15:26 +00:00
committed by GitHub
co-authored by Kushal Pisavadia Jen Basch Islon Scherer
parent 175e2b6273
commit 67df676359
51 changed files with 4982 additions and 349 deletions
+6
View File
@@ -5,6 +5,7 @@ checksumPlugin = "1.4.0"
clikt = "5.0.3"
commonMark = "0.29.0"
downloadTaskPlugin = "5.7.0"
eclipseCdtFormat = "12.2"
errorProne = "2.50.0"
errorPronePlugin = "5.1.0"
geantyref = "2.0.1"
@@ -30,10 +31,12 @@ graalVmSha256-windows-aarch64 = "unavailable"
ideaExtPlugin = "1.4.1"
javaPoet = "0.17.0"
javaxInject = "1"
jextractPlugin = "1.+"
jimfs = "1.3.1"
jline = "4.3.1"
jmh = "1.37"
jmhPlugin = "0.7.3"
jna = "5.19.1"
jspecify = "1.0.0"
junit = "6.1.1"
# 1.7+ generates much more verbose code
@@ -84,6 +87,8 @@ jimfs = { group = "com.google.jimfs", name = "jimfs", version.ref = "jimfs" }
jlineReader = { group = "org.jline", name = "jline-reader", version.ref = "jline" }
jlineTerminal = { group = "org.jline", name = "jline-terminal", version.ref = "jline" }
jlineTerminalJni = { group = "org.jline", name = "jline-terminal-jni", version.ref = "jline" }
jna = { group = "net.java.dev.jna", name = "jna", version.ref = "jna" }
jnaPlatform = { group = "net.java.dev.jna", name = "jna-platform", version.ref = "jna" }
#noinspection UnusedVersionCatalogEntry
jspecify = { group = "org.jspecify", name = "jspecify", version.ref = "jspecify" }
junitApi = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit" }
@@ -134,3 +139,4 @@ nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "ne
#noinspection UnusedVersionCatalogEntry
nullaway = { id = "net.ltgt.nullaway", version.ref = "nullawayPlugin" }
shadow = { id = "com.gradleup.shadow", version.ref = "shadowPlugin" }
jextract = { id = "de.infolektuell.jextract", version.ref = "jextractPlugin" }