Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlin Native in 1.6

RyuNen344
November 16, 2021

Kotlin Native in 1.6

RyuNen344

November 16, 2021
Tweet

More Decks by RyuNen344

Other Decks in Programming

Transcript

  1. Kotlin 1.5.30 • Apple Silicon Support • arm64ܥͷαϙʔτ • CocoaPods

    Gradle Pluginͷ֦ு • Swift 5.5 async/awaitޓ׵ੑ޲্ • Companion Objectͷޓ׵ੑ޲্
  2. Kotlin 1.5.30 Swift 5.5 async/await • kotlinͷsuspendؔ਺ͷޓ׵ࣗମ͸kotlin 1.4Ͱಋೖ • Swift/Objective-CڞʹCompletion

    Handlerͱͯ͠ఏڙ͞Ε͍ͯͨ • Swift5.5Ҏ߱ʹ͍ͭͯ͸async/awaitͱͯ͠kotlinͷsuspendؔ਺Λ ࢖͑Δ
  3. ݱঢ়ͷMemory Management....ͷલʹ JVM/android Swift, Objective-C/iOS Tracing Garbage Collection Automatic Reference

    Counting Full GCͷ૸Δͱ͢΂͕ͯࢭ·Δ͜ͱ͕͋Δ (Stop The World) compile timeʹΧ΢ϯτ͢ΔॲཧΛຒΊࠐΉ increment, decrement͢ΔॲཧͷͨΊϧʔϓ ౳ͷॲཧͰΦʔόʔϔου͕ൃੜ
  4. ݱঢ়ͷMemory Management 0ME /FX Deferred Reference Counting GC Stop The

    World mark and sweep GC εϨουͷϒϩοΫΛճආ͢Δඞཁ͕͋Δ(ཁ freeze) GCͷλΠϛϯάΛԆظͤ͞ΔͨΊස౓͸ݮΔ ͕ॲཧ͕࣌ؒ௕͘ͳΔ freeze͠ͳͯ͘΋εϨουΛލ͍ͰΦϒδΣΫ τͱϓϩύςΟʹΞΫηεͰ͖Δ* ύϑΥʔϚϯεѱ͍(εϨου͕ࢭ·Δ) ΞϧΰϦζϜ͸ݕ౼த
  5. ϥΠϒϥϦͷରԠঢ়گ • Ktor • 2.0.0ͰରԠ͞Εͨόʔδϣϯ͕stableʹͳΔ • eapΛࢼ͢৔߹͸1.6.2-native-mm-eap-196 • Coroutine •

    1.5.3ͰstableʹͳΓͦ͏ • eapΛࢼ͢৔߹͸1.5.1-new-mm-dev2 • SQLDelight • ಈ͔ͳ͍ࢫͷissueཱ͕͍ͬͯΔ (https://github.com/cashapp/sqldelight/issues/2556) • eapʹରԠ͸͠ͳ͍༷ࢠͳͷͰkotlinଆͷnew mm͕ରԠ͞Ε͔ͯΒʹͳΓͦ͏
  6. ࢀߟࢿྉ • σϞΞϓϦ(https://github.com/RyuNen344/koin-mpp-sample/releases/tag/newmm) • Kotlin/Native Memory Management Update(https://blog.jetbrains.com/kotlin/ 2021/05/kotlin-native-memory-management-update/) •

    Prototype a new garbage collector(https://youtrack.jetbrains.com/issue/KT-42296) • Try the New Kotlin/Native Memory Manager Development Preview(https:// blog.jetbrains.com/kotlin/2021/08/try-the-new-kotlin-native-memory-manager- development-preview/) • NEW_MM.md(https://github.com/JetBrains/kotlin/blob/master/kotlin-native/ NEW_MM.md)