https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
kotlin-native
  • s

    spierce7

    07/27/2018, 1:41 PM
    Why does kotlinx.coroutines for kotlin/native have to run inside
    runBlocking
    ?
    a
    • 2
    • 5
  • a

    Aregev2

    07/27/2018, 2:58 PM
    Having troubles to setup kotlinx.coroutines native. is there a way I can get it as a klib or something?
    m
    • 2
    • 1
  • a

    Aregev2

    07/28/2018, 10:34 AM
    Is it possible to mix Kotlin and C code in the same klib library?
    m
    g
    +3
    • 6
    • 14
  • t

    thevery

    07/29/2018, 10:20 PM
    Is is possible to use
    XCTest
    from K/N?
    v
    • 2
    • 2
  • d

    dany

    07/30/2018, 2:32 PM
    afaik Kotlin Native is not yet supported in IDEA, you can use AppCode or CLion though
    🙏 1
    w
    • 2
    • 3
  • r

    rudolf.hladik

    07/30/2018, 6:20 PM
    Ok, so if I would like to develop multiplatform applications mainly for Android and iOS platform which IDE should I purchase? AppCode or CLion and why?
    v
    a
    • 3
    • 7
  • t

    thevery

    07/30/2018, 7:11 PM
    Any news on 0.8.1 release with framework support in plugin?
    r
    p
    • 3
    • 5
  • j

    jdiaz

    07/30/2018, 8:46 PM
    Any good starting point on kotlin native? I just bought clion and I want to test it out but everything I've seen is too advanced lol
    t
    • 2
    • 1
  • t

    thevery

    07/31/2018, 3:00 PM
    Is there any documentation for friend modules? I want to use internal field in tests, is it possible?
    s
    p
    i
    • 4
    • 4
  • t

    thevery

    08/01/2018, 11:17 AM
    @ilya.matveev is there anything interesting in native utils or it is just for the plugin itself? https://github.com/JetBrains/kotlin-native/pull/1837
    i
    • 2
    • 1
  • k

    koufa

    08/01/2018, 11:24 AM
    Are there any plans for Kotlin Native to be the “default” Kotlin variant? As it then would be independent of the JVM and Oracle.
    g
    a
    +2
    • 5
    • 13
  • c

    christophsturm

    08/02/2018, 11:44 AM
    are people using kotlin native for ios game development? it would be great for cross platform game logic that is shared between ios and android.
    o
    a
    +2
    • 5
    • 8
  • t

    thevery

    08/02/2018, 10:16 PM
    error: conflicting nullability specifier on parameter types, 'nonnull' conflicts with existing specifier '_Nullable'
    - (int32_t)compareToOther:(YOUMStdlibEnum *)other __attribute__((swift_name("compareTo(other:)")));
                                                ^
    note: previous declaration is here
    - (int32_t)compareToOther:(id _Nullable)other __attribute__((swift_name("compareTo(other:)")));
    @protocol YOUMStdlibComparable
    @required
    - (int32_t)compareToOther:(id _Nullable)other __attribute__((swift_name("compareTo(other:)")));
    @end;
    
    @interface YOUMStdlibEnum : KotlinBase <YOUMStdlibComparable>
    - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer));
    - (id)clone __attribute__((swift_name("clone()")));
    - (int32_t)compareToOther:(YOUMStdlibEnum *)other __attribute__((swift_name("compareTo(other:)")));
    @property (readonly) NSString *name;
    @property (readonly) int32_t ordinal;
    @end;
    Is it a known problem? Maybe some workaround?
    s
    • 2
    • 2
  • d

    drofwarcs

    08/03/2018, 3:46 AM
    Is there a changelog for K/N Appcode plugin?
    v
    • 2
    • 2
  • a

    adam-mcneilly

    08/03/2018, 3:13 PM
    https://twitter.com/kpgalligan/status/1025379360910573574
    🎉 7
    t
    • 2
    • 4
  • k

    khairil.ushan

    08/03/2018, 7:03 PM
    Since I'm using the kotlin-platform-native plugin, where can I configure the generated prefix class name in my objc framework? Previously when using
    konan
    plugin I can set it on
    framework('MyLib')
    inside
    konanArtifacts
    block.
    t
    m
    • 3
    • 8
  • s

    snowe

    08/04/2018, 11:38 PM
    anyone have any guidance on using wasm? I am just trying to learn kotlin native/wasm and just want to print something to the console. I've tried this WASM tutorial https://superkotlin.com/kotlin-and-webassembly/, but am having trouble modifying it (windows maybe?)
    n
    o
    • 3
    • 12
  • r

    raniejade

    08/05/2018, 9:37 AM
    Howdy! How's the IDE support for kotlin native? I can't seem to get autocompletion for interop artifacts.
    t
    d
    n
    • 4
    • 10
  • r

    raniejade

    08/05/2018, 9:37 AM
    Also anyone tried, building a native project with java 10? It's failing on me, works java 8 tho.
    o
    • 2
    • 1
  • s

    sendilkumarn [JHipster]

    08/05/2018, 5:49 PM
    Hey guys, one question. Do we have to add any extra annotations to expose a method in
    wasm
    ? Or we can just call the main method at this point?
    o
    • 2
    • 2
  • t

    thevery

    08/05/2018, 6:32 PM
    With new
    kotlin-platform-native
    test compile task (
    compileTestDebugKotlinNative
    ) is dynamic so you can access it only after configuration using
    task test(dependsOn: 'compileTestDebugKotlinNative', overwrite: true) {
        doLast {
            exec {
                def textExecutable = tasks["compileTestDebugKotlinNative"].outputFile
                commandLine("xcrun", "simctl", "spawn", "iPhone 8", textExecutable)
            }
        }
    }
    or
    afterEvaluate { project ->
        project.task('test', dependsOn: 'compileTestDebugKotlinNative', type: Exec, overwrite: true) {
            def textExecutable = tasks["compileTestDebugKotlinNative"].outputFile
            commandLine("xcrun", "simctl", "spawn", "iPhone 8", textExecutable)
        }
    }
    @ilya.matveev which option is better in your opinion? Or maybe you have some plans to 'fix' test task in plugin for simulator?
    i
    • 2
    • 1
  • d

    drofwarcs

    08/05/2018, 8:36 PM
    has anyone else been getting
    java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.backend.konan.KonanPlatform
    from the K\N plungin for Appcode after upgrading to Appcode to 2018.2? Most of the features of the plugin(code completion, documentation..etc) stops working after this crash. Going back to 2018.1 works fine but the version of the plugin for that version always uses K/N 7.1.
    v
    • 2
    • 1
  • t

    thevery

    08/05/2018, 10:35 PM
    Is it possible to specify target path for new platform native plugin like it was in konan? This sample doesn't look simple and easy: https://github.com/e5l/http-client-common/commit/2fc080bf31ce8f5e493acb10bb256bd165a7d28b#diff-b7c13da9e9133e2ddb2ed1ddd9183148R170
    i
    • 2
    • 2
  • k

    khairil.ushan

    08/06/2018, 7:05 AM
    Hi, I just trying to compile my K/N module to
    .framework
    . but when i ran it on xcode, i got a lot error mostly complain the
    -
    character in the class name
    @protocol MppProjectRepository
    @required
    - (id<MppKotlinx-coroutines-core-nativeDeferred>)searchProjectParams:(MppSearchProjectInteractorParams *)params __attribute__((swift_name("searchProject(params:)")));
    @end;
    Is there something to configure to avoid this issue?
    s
    t
    • 3
    • 4
  • r

    rjhdby

    08/06/2018, 11:50 AM
    Hi. How I can convert String into C-string? This code
    import platform.posix.*
    fun getPrecisionIni() = "precision".cstr
    produce error on compile time
    example_num.kt:10:37: error: unresolved reference: cstr
    fun getPrecisionIni() = "precision".cstr
    g
    • 2
    • 2
  • e

    evanchooly

    08/06/2018, 10:52 PM
    has anyone heard?
    n
    s
    +2
    • 5
    • 11
  • k

    kpgalligan

    08/07/2018, 2:54 AM
    Digging into the new plugin DSL. The config is kind of hard to follow in source, but will try to sort it out tomorrow. Just in case anybody has the answer, is there a way to specify 'nativeLibraries' on a library, and/or can you add a gradle dependency from the original kotlin native plugin with the new DSL? We have a fairly complex library config. https://github.com/touchlab/knarch.db/blob/master/kotlin/knarch-ios/build.gradle. There's a fairly substantial C++ component of the library.
    i
    • 2
    • 1
  • r

    rjhdby

    08/07/2018, 8:15 AM
    Can anyone help me with C macro? See full description in thread.
    m
    s
    +2
    • 5
    • 20
  • r

    rjhdby

    08/07/2018, 2:43 PM
    Why compiler says
    error: no spread elements allowed here
    for this code?
    immutableBinaryBlobOf(*(name.toCharArray() as ShortArray))
    s
    a
    • 3
    • 6
  • s

    shusek

    08/07/2018, 3:54 PM
    My code in kotlin / fun myArray() = intArrayOf(1,2,3)
    o
    • 2
    • 5
Powered by Linen
Title
s

shusek

08/07/2018, 3:54 PM
My code in kotlin / fun myArray() = intArrayOf(1,2,3)
o

olonho

08/08/2018, 7:22 AM
In C/C++ Kotlin primitive arrays could be passed as C pointers: https://github.com/JetBrains/kotlin-native/blob/master/INTEROP.md#passing-pointers-to-bindings
s

shusek

08/08/2018, 1:25 PM
Do you have some sample for that case? In my case I call kotlin code from C. In my header file I got cinterop_CValues as returned type but I am not sure how can I use it.
o

olonho

08/08/2018, 2:37 PM
when calling Kotlin from C accessor methods getting element by index could be implemented. Generally we export to C only what programmer explicitly written, not stdlib operations
s

shusek

08/08/2018, 3:56 PM
So at this moment I can not return arrays from kotlin to C?
o

olonho

08/10/2018, 1:21 PM
you can return anything you want, but need to provide required accessors yourself, we will try to fix it in upcoming version of C interop
View count: 2