kord icon indicating copy to clipboard operation
kord copied to clipboard

Support Kotlin/Native

Open DRSchlaubi opened this issue 1 year ago • 7 comments

This PR aims at implementing Kotlin/Native for the following platforms:

  • linuxX64
  • linuxArm64
  • mingwX64
  • macosArm64
  • macosX64
  • iosArm64
  • iosX64
  • iosSimulatorArm64
  • watchosX64
  • watchosArm64
  • watchosSimulatorArm64
  • tvosX64
  • tvosArm64
  • tvosSimulatorArm64

Experimental Snapshot

There currently is an experimental snapshot on OSSRH under the feature-native-SNAPSHOT for you to try

An example implementation can be found here

Please note that you need to configure our custom repository:

Gradle Configuration
repositories {
    // Required for custom Ktor build
    maven("https://europe-west3-maven.pkg.dev/mik-music/kord")
    maven("https://oss.sonatype.org/content/repositories/snapshots/")
    mavenCentral()
}

kotlin {
  sourceSets {
    commonMain {
      dependencies {
        implementation("dev.kord:kord-core:feature-native-SNAPSHOT")
      }
    }
  }
}
  

Current limitations

  • This currently uses https://github.com/ktorio/ktor/pull/3950, which will be available in ktor 3.0.0 the earliest
  • voice and core-voice are only available on Linux and Darwin (See #69)

Checklist

  • [x] kordlib/cache#12
  • [ ] kordlib/kordx.emoji#23
  • [x] Port voice to native (cc @lost-illusi0n)
  • [x] Configure CI (kordlib/.teamcity
  • [x] Release a new native compatible version of cache
  • [x] Release kordlib/setup-curl
  • [x] Release kordlib/docker
  • [ ] Release Kord/Native
  • [ ] Release kordx.emoji

Blocked by

  • https://github.com/ktorio/ktor/pull/3950
  • #822
  • https://github.com/kordlib/cache/pull/12
  • ~~TW-86481~~ (Workaround implemented)

DRSchlaubi avatar Aug 05 '23 23:08 DRSchlaubi

can't wait to run my bot on an apple watch

lukellmann avatar Aug 05 '23 23:08 lukellmann

what's this commit? seems to be related to #836 but that is already on main.

lukellmann avatar Aug 05 '23 23:08 lukellmann

When I compiled these files were generated

DRSchlaubi avatar Aug 06 '23 12:08 DRSchlaubi

can't wait to run my bot on an apple watch

Need to buy one again for this, or ask @melike2d

DRSchlaubi avatar Aug 06 '23 12:08 DRSchlaubi

can't wait to run my bot on an apple watch

Need to buy one again for this, or ask @melike2d

can't believe you think i have enough money for that

viztea avatar Aug 06 '23 12:08 viztea

When I compiled these files were generated

the one in the build dir, sure, but the other ones?

lukellmann avatar Aug 06 '23 12:08 lukellmann

A workaround for the blocking teamcity bug has been implemented, snapshots are now published to feature-native-SNAPSHOT

DRSchlaubi avatar Feb 29 '24 15:02 DRSchlaubi