Skip to content

Commit f02748b

Browse files
authored
Add iosArm32 support (#113)
1 parent 3d6ca41 commit f02748b

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

core/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ kotlin {
1616
publishAllLibraryVariants()
1717
}
1818
iosX64()
19+
iosArm32()
1920
iosArm64()
2021
macosX64()
2122

@@ -47,6 +48,12 @@ kotlin {
4748
}
4849
}
4950

51+
val iosArm32Main by getting {
52+
dependencies {
53+
implementation(stately("isolate-iosarm32"))
54+
}
55+
}
56+
5057
val iosArm64Main by getting {
5158
dependencies {
5259
implementation(stately("isolate-iosarm64"))

core/src/appleMain/kotlin/NSData.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.juul.kable
22

33
import kotlinx.cinterop.addressOf
44
import kotlinx.cinterop.allocArrayOf
5+
import kotlinx.cinterop.convert
56
import kotlinx.cinterop.memScoped
67
import kotlinx.cinterop.usePinned
78
import platform.Foundation.NSData
@@ -19,6 +20,6 @@ internal fun NSData.toByteArray(): ByteArray = ByteArray(length.toInt()).apply {
1920
internal fun ByteArray.toNSData(): NSData = memScoped {
2021
NSData.create(
2122
bytes = allocArrayOf(this@toNSData),
22-
length = size.toULong()
23+
length = size.convert()
2324
)
2425
}

core/src/iosArm32Main

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
appleMain

core/src/iosArm32Test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
appleTest

0 commit comments

Comments
 (0)