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
  • b

    benleggiero

    10/15/2017, 2:37 AM
    Is there any equivalent to
    java.lang.Double.doubleToLongBits
    in Kotlin/Common?
    y
    i
    5 replies · 3 participants
  • s

    suresh

    10/15/2017, 7:01 AM
    Can we expect kotlin coding conventions (https://kotlinlang.org/docs/reference/coding-conventions.html#naming-style) being applied for the generated klib
    platform.*
    libraries or will it be same as one defined in the header files?
    o
    1 reply · 2 participants
  • g

    goncalossilva

    10/16/2017, 3:12 PM
    Is this something that's possible right now? If not, is it in the horizon?
    o
    1 reply · 2 participants
  • g

    goncalossilva

    10/16/2017, 3:12 PM
    I'm pushing for using Kotlin internally to share resources between all platforms. One question that arised is compiling for Windows, particularly, compiling as a UWP class library.
    o
    n
    +1
    7 replies · 4 participants
  • f

    Francis

    10/19/2017, 4:42 AM
    I'm trying to add an interopt for libui, I'm stock with dyld error
    dyld: Library not loaded: @rpath/libui.A.dylib
      Referenced from: /private/var/workspace/test/kui/./uiDemo.kexe
      Reason: image not found
    any hint to help me find the problem?
    m
    o
    7 replies · 3 participants
  • m

    Marc Knaup

    10/19/2017, 4:04 PM
    Hey guys, is there some info on the web already about writing & testing cross-platform (JVM, JS & Native) Kotlin libraries?
    o
    1 reply · 2 participants
  • j

    jw

    10/19/2017, 4:37 PM
    native doesn't work with the multiplatform support yet
    o
    m
    +1
    10 replies · 4 participants
  • s

    shodan45

    10/21/2017, 4:54 PM
    maybe use Qt & Wt? 🙂
    s
    r
    +1
    14 replies · 4 participants
  • i

    Ian

    10/23/2017, 3:25 AM
    We’re thinking about writing a desktop app in Kotlin. We’ll initially target the JVM, but it would be nice if we could do things in a way that will make it easier to compile to native also. Are there any high-level suggestions for doing this? I guess try to avoid any Java dependencies that don’t have similar native equivalents…
    e
    u
    2 replies · 3 participants
  • m

    Marc Knaup

    10/23/2017, 9:52 AM
    Is
    Class
    cross-platform? Because
    KClass
    doesn’t seem to have a replacement for
    isAssignableFrom()
    .
    s
    p
    6 replies · 3 participants
  • e

    eygraber

    10/23/2017, 3:07 PM
    I'm getting this error when trying to compile a basic project that includes the dokany headers:
    D:\workspace\konan\build\konan\nativelibs\genDokanyInteropStubs\dokanystubs.c:2222:21: error: always_inline function '_cvtsh_ss' requires target feature 'sse4.1', but would be inlined into function 'dokany_kni__cvtsh_ss' that is compiled without support for 'sse4.1'
        return (float) (_cvtsh_ss((unsigned short)__a));
                        ^
    o
    m
    16 replies · 3 participants
  • p

    peterholak

    10/23/2017, 3:22 PM
    maybe try specifying a
    headerFilter
    in the .def file to only include headers with functions you'll actually use
    e
    2 replies · 2 participants
  • o

    ohmer

    10/24/2017, 9:06 AM
    Is any body encounter the problem like this when build csvparser sample:
    src/main/kotlin/CsvParser.kt:18:8: error: unresolved reference: platform
    import platform.posix.*
          ^
    m
    o
    3 replies · 3 participants
  • o

    ohmer

    10/26/2017, 10:38 AM
    Can i use .klib when developing in c or other language. Or do kotlin-native have a plan to support this scene?
    o
    1 reply · 2 participants
  • e

    eygraber

    10/26/2017, 4:55 PM
    My code is here - https://github.com/eygraber/dokany-kotlin-native When I run my main I get this error:
    > gradlew clean build
    
    > Task :compileKonanDokanyMingw
    KtFile: dokany.kt
    
    > Task :compileKonanHelloMingw
    KtFile: hello.kt
    C:\Users\eli\AppData\Local\Temp\combined8935351649574038201.o:(.text+0x316): undefined reference to `__imp_DokanVersion'
    C:\Users\eli\AppData\Local\Temp\combined8935351649574038201.o:(.text+0x326): undefined reference to `__imp_DokanDriverVersion'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    exception: java.lang.IllegalStateException: The C:\Users\eli\.konan\kotlin-native-windows-0.3/dependencies/msys2-mingw-w64-x86_64-gcc-6.3.0-clang-llvm-3.9.1-windows-x86-64/bin/clang++ command returned non-zero exit code: 1.
    at org.jetbrains.kotlin.backend.konan.LinkStage.runTool(LinkStage.kt:310)
    at org.jetbrains.kotlin.backend.konan.LinkStage.link(LinkStage.kt:263)
    at org.jetbrains.kotlin.backend.konan.LinkStage$linkStage$3.invoke(LinkStage.kt:326)
    at org.jetbrains.kotlin.backend.konan.LinkStage$linkStage$3.invoke(LinkStage.kt:185)
    at org.jetbrains.kotlin.backend.konan.PhaseManager$phase$$inlined$with$lambda$1.invoke(KonanPhases.kt:127)
    at org.jetbrains.kotlin.backend.konan.PhaseManager$phase$$inlined$with$lambda$1.invoke(KonanPhases.kt:106)
    at org.jetbrains.kotlin.backend.konan.util.UtilKt.profileIf(util.kt:33)
    at org.jetbrains.kotlin.backend.konan.PhaseManager.phase$backend_native_compiler(KonanPhases.kt:126)
    at org.jetbrains.kotlin.backend.konan.LinkStage.linkStage(LinkStage.kt:325)
    at org.jetbrains.kotlin.backend.konan.KonanDriverKt$runTopLevelPhases$5.invoke(KonanDriver.kt:123)
    at org.jetbrains.kotlin.backend.konan.KonanDriverKt$runTopLevelPhases$5.invoke(KonanDriver.kt)
    at org.jetbrains.kotlin.backend.konan.PhaseManager$phase$$inlined$with$lambda$1.invoke(KonanPhases.kt:127)
    at org.jetbrains.kotlin.backend.konan.PhaseManager$phase$$inlined$with$lambda$1.invoke(KonanPhases.kt:106)
    at org.jetbrains.kotlin.backend.konan.util.UtilKt.profileIf(util.kt:33)
    at org.jetbrains.kotlin.backend.konan.PhaseManager.phase$backend_native_compiler(KonanPhases.kt:126)
    at org.jetbrains.kotlin.backend.konan.KonanDriverKt.runTopLevelPhases(KonanDriver.kt:122)
    at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:69)
    at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:56)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:93)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:46)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:90)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:68)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:34)
    at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:160)
    at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:151)
    at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:169)
    at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:166)
    at org.jetbrains.kotlin.backend.konan.util.UtilKt.profileIf(util.kt:33)
    at org.jetbrains.kotlin.backend.konan.util.UtilKt.profile(util.kt:28)
    at org.jetbrains.kotlin.cli.bc.K2Native$Companion.main(K2Native.kt:168)
    at org.jetbrains.kotlin.cli.bc.K2NativeKt.main(K2Native.kt:174)
    at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:46)
    
    
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':compileKonanHelloMingw'.
    > Process 'command 'C:\Program Files\Java\jdk1.8.0_77\bin\java.exe'' finished with non-zero exit value 2
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    * Get more help at <https://help.gradle.org>
    
    BUILD FAILED in 17s
    4 actionable tasks: 4 executed
  • e

    eygraber

    10/27/2017, 1:39 AM
    Where do the kotlin files for
    platform.windows.*
    located?
    o
    m
    5 replies · 3 participants
  • b

    badlogic

    10/28/2017, 7:22 AM
    i tried searching for answer to this but failed to find info: can on generate a shared library out of KN code yet? and if not, how would i approach implementing that?
    o
    7 replies · 2 participants
  • t

    tunedal

    10/29/2017, 9:48 PM
    Any idea why the compiler might be failing with messages like these? I'm running v0.3.4 (with Gradle) under Wine. It used to work, with v0.3 I think.
    ...
    C:\users\konan\.konan\kotlin-native-windows-0.3.4\dependencies\msys2-mingw-w64-x86_64-gcc-6.3.0-clang-llvm-3.9.1-windows-x86-64\bin\ld: Dwarf Error: mangled line number section (bad file number).
    C:\users\konan\.konan\kotlin-native-windows-0.3.4\dependencies\msys2-mingw-w64-x86_64-gcc-6.3.0-clang-llvm-3.9.1-windows-x86-64\bin\ld: Dwarf Error: Offset (1562511360) greater than or equal to .debug_str size (262582).
    ...
    o
    m
    4 replies · 3 participants
  • r

    rwachol

    11/02/2017, 11:22 PM
    Will kotlin native be supported in intellij community as well ?
    n
    2 replies · 2 participants
  • e

    eygraber

    11/03/2017, 7:54 AM
    So gradle is no longer the way to build kotlin native code? 😢
    s
    o
    +2
    14 replies · 5 participants
  • u

    uli

    11/03/2017, 1:54 PM
    where do the
    import platform.UIKit
    get resolved from? Is it generated? Or provided by JB?
    o
    1 reply · 2 participants
  • u

    uliluckas

    11/03/2017, 9:17 PM
    Hi, Is target android_x86 supported or support planned? This would help alot in development on the emulator
    o
    l
    5 replies · 3 participants
  • s

    spierce7

    11/04/2017, 5:17 AM
    A question that keeps popping up for me when I look at the sample spinner application, it's not expected that people will develop for Android with Kotlin-native right? The goal would be that a multi-platform project would be used to share code between Android and iOS, right?
    o
    1 reply · 2 participants
  • o

    olonho

    11/04/2017, 4:34 PM
    Kotlin/Native team is pleased to announce release v0.4 (KotlinConf 2017 release) of our toolchain. This is a major update, including the following features: * Objective-C frameworks interop for iOS and OSX targets * Platform API libraries for Linux, iOS, OSX and Windows * Kotlin 1.2 supported *
    val
    and function parameters can be inspected in debugger * Experimental support for WebAssembly (wasm32 target) * Linux MIPS support (little and big endian, mips and mipsel targets) * Gradle plugin DSL fully reworked * Support for unit testing annotations and automatic test runner generation * Final executable size reduced * Various interop improvements (forward declaration, better handling of unsupported types) * Workers object subgraph transfer checks implemented * Optimized low level memory management using more efficient cycle tracing algorithm With v0.4 iOS/OSX targets could finally be used with the full power of platform framework, so you may start developing apps. Please let us know your experience, we worked very hard to provide you this release. Binaries can be downloaded from the following links: * http://download.jetbrains.com/kotlin/native/kotlin-native-macos-0.4.tar.gz * http://download.jetbrains.com/kotlin/native/kotlin-native-linux-0.4.tar.gz * http://download.jetbrains.com/kotlin/native/kotlin-native-windows-0.4.zip GitHub release page is https://github.com/JetBrains/kotlin-native/releases/tag/v0.4.
    🎉 16
    ❤️ 5
    s
    s
    2 replies · 3 participants
  • i

    irus

    11/04/2017, 5:55 PM
    Is it possible to use Kotlin Native for ESP32 or similar chips?
    m
    o
    6 replies · 3 participants
  • m

    Michael Kotlikov

    11/04/2017, 6:26 PM
    Are coroutines supported?
    o
    1 reply · 2 participants
  • s

    sksk

    11/04/2017, 7:14 PM
    there is ``bitsToFloat`` what about the opposite float to intbits ? EDIT: oh nevermind there is float.bits()
    o
    4 replies · 2 participants
  • c

    chi

    11/05/2017, 9:05 AM
    Hey guys, I saw that Kotlin native was used to build an iOS app, how is this possible?
    o
    1 reply · 2 participants
  • e

    eygraber

    11/05/2017, 7:24 PM
    Are there any plans to write a guide for creating a CMake file from an existing Kotlin native gradle file?
    n
    2 replies · 2 participants
  • u

    uliluckas

    11/05/2017, 9:55 PM
    Does the producer of a worker need to produce an object? While expermenting with
    Worker
    I had the producer produce `Int`and i got pretty random results. When wrapping that Int into a data class things worked fine. Is this known behavior? Atm or by design?
    o
    1 reply · 2 participants
Powered by Linen
Title
u

uliluckas

11/05/2017, 9:55 PM
Does the producer of a worker need to produce an object? While expermenting with
Worker
I had the producer produce `Int`and i got pretty random results. When wrapping that Int into a data class things worked fine. Is this known behavior? Atm or by design?
o

olonho

11/06/2017, 6:28 PM
yep, object is needed, however please report an issue, boxing shall take place there.
View count: 2