Repository navigation
Releases: caffeine-mgn/klua
Releases · caffeine-mgn/klua
Release list
klua 0.2.1
klua 0.2.1
Build/CI release: the whole publication now happens on a macOS host, so a single
Maven Central deployment carries every target.
Distribution
- All published Kotlin/Native targets in one deployment:
linuxx64,linuxarm64,mingwx64,macosarm64,androidnativearm64,androidnativex64, plus theklua-androidAAR and the JVM jar. pw.binom:klua-macosarm64is new. The Apple target is nowmacosArm64;macosx64was removed (deprecated upstream in Kotlin 2.3.20 and never actually published, even though the root module advertised it — macOS consumers got a broken resolution instead of a clear "unsupported").klua-jvmnow really bundles all four host natives:libklua.sofor Linux x86_64/AArch64,libklua.dll(MinGW x86_64) andlibklua.dylib(macOS Apple silicon). The Windows and macOS libraries were silently missing before, so desktop JVM on those platforms failed at load time.
Fixes
- Windows JNI build: the MinGW sysroot shipped with Kotlin/Native has no
clock_gettime, so the limits core usesQueryPerformanceCounterunder_WIN32. The Windows library had never actually been built before, because the cross target silently no-op'ed without the platform'sjni_md.h. - The Android AAR ABI gate now also runs on the macOS host (GNU
readelfdoes not exist there;greadelf/llvm-readelfis resolved instead). -Pversion=now overrides the tag-derived version, so the release graph can be dry-run without publishing.
CI
- A separate Ubuntu job runs
jvmTestandlinuxX64Test(a Linux test binary cannot run on macOS, and Apple targets cannot be built on Linux); the macOS job runsjvmTest+macosArm64Test, builds and gates the AAR, then publishes. - The JVM jar payload and the AAR ABI (bionic, not glibc) are asserted before publishing.
No changes to the Lua API in this release.
klua 0.2.0
klua 0.2.0
Android support and a proper sandbox for untrusted Lua.
Android
- New artifact
pw.binom:klua-android— acom.android.libraryAAR (minSdk24) that ships prebuiltlibklua.soforarm64-v8aandx86_64and loads it viaSystem.loadLibrary("klua"). 32-bit ABIs are not packaged. - New Kotlin/Native targets
androidNativeArm64/androidNativeX64(removedandroidNativeArm32/androidNativeX86). - The JNI Kotlin now lives in a shared
jvmSharedMainsource set used by bothjvmMain(desktop jar loader) andandroidMain; the platform seam isexpect fun loadNativeLibrary().
Sandboxing
LuaEngine(libraries: Set<LuaLibrary> = emptySet(), ...)— per-library standard-library selection (LuaLibrary.ALL,LuaLibrary.SAFE). A fresh engine is still bare (noos/io/package/debug).- Binary chunks are rejected by default (
allowBinaryChunks = false):evalcompiles text-only and the same restriction is applied to Lua'sload/loadstring/loadfile/dofile. - Execution limits (
LuaLimits(maxInstructions, timeout, maxMemoryBytes)): instruction cap, wall-clock deadline and memory cap, enforced by a shared C core (customlua_Alloc+LUA_MASKCOUNThook) used by both the JNI and Kotlin/Native backends. Violations throwLuaLimitException(kind);pcallcannot swallow them. LuaEngine.cancel()cooperatively aborts a long-running eval from another thread (LuaLimitKind.CANCELLED).
Fixes / build
- Replaced
java.lang.ref.Cleaner(API 33+) with aPhantomReference-based cleaner plus deferred, owner-thread unref, fixing a cross-thread race and keepingminSdk24. - Untracked
build/and.gradle/outputs. - CI: release workflow now installs the Android SDK, packages the AAR, runs a bionic/glibc ABI gate (
readelf), and checks that build outputs are not tracked.
Tests
jvmTest61/61,linuxX64Test50/50 (library selection, binary-chunk rejection, execution limits).
klua 0.1.7
klua 0.1.6 — CI/CD to Maven Central
CI/CD: tag-triggered Maven Central publish
Adds the publishing infrastructure that was previously wired only for a self-hosted macOS ARM runner.
Build changes
- Plugin chain swap.
maven-publish+pw.binom.publish.PrepareProject→com.vanniktech.maven.publish+org.jetbrains.dokka, both pinned in the newgradle/libs.versions.tomlcatalog. mavenPublishing { publishToMavenCentral(automaticRelease = true); signAllPublications(); coordinates(pw.binom:klua:<tag>) }replaces the old in-house POM/scm/license blocks.- Signing toggle.
signingUseGpg=true(CI) switches thesigningextension touseGpgCmd(); locally it falls back to in-memory PGP keys fromsigningInMemoryKey{,Id,Password,IsBase64}(or the legacybinom.gpg.*properties). - Source-set wiring. The dead
pw.binom.publish.dependsOn(mask, to)helper (from the removed binom-publish plugin) is replaced with a standardsourceSets.matching { ... }.configureEach { dependsOn(...) }block — same semantics for the linux/androidNative/mingw/macos POSIX family. - buildSrc cleanup. Dropped
pw.binom:binom-publish:0.1.23,org.jetbrains.dokka:dokka-gradle-plugin:1.9.20, and the now-orphanedpw.binom.plugins.HttpServerTask+io.vertx:vertx-web:4.2.1.
Workflow
- New
.github/workflows/release.yml(tag-triggered onN.N.N*). ubuntu-latest+ Temurin OpenJDK 21 (Liberica 21.0.6 tripsgetgenericunder this project's JNI binding, see project memory).- Installs
gcc g++ clang mingw-w64, imports the GPG key viaprintf '%b'+pinentry-mode loopback. - Pre-publish test gate:
jvmTest linuxX64Testmust stay green. Pre-chained withdownloadKonanToolchainLinux_arm64,downloadKonanToolchainMingw_x64so the cross-target JVM host libs have toolchains. The KGP 2.4.20downloadKonantask itself is skipped (-x downloadKonan) because it hardcodes the legacy asset name; the workflow pre-fetches the correctkotlin-native-prebuilt-linux-x86_64-2.4.20.tar.gzfrom GitHub releases and unpacks it into~/.konan/before gradle runs. publishToMavenCentralis invoked with-PsigningUseGpg=true -Psigning.gnupg.{keyName,passphrase}=… -PmavenCentralUsername=… -PmavenCentralPassword=…. Uses the new Central Portal API (central.sonatype.com), not the legacy s01 staging URL.- Old
.github/workflows/publish.yml(self-hosted semeru JDK 17) removed. .gitignorenow coversbuild/,.gradle/,buildSrc/{build,.gradle}/,.kotlin/,.idea/,.veai/.
Verified locally
./gradlew help— plugins load clean../gradlew tasks --group=publishing—publishToMavenCentral, per-targetpublishJvmPublicationToMavenCentralRepository/publishLinuxX64PublicationToMavenCentralRepository/publishLinuxArm64…/publishMingwX64…/publishAndroidNative{32,64,X86,X64}…, plussign*Publicationtasks are registered../gradlew jvmTest— 44/44 pass../gradlew linuxX64Test— 35/35 pass.