https://kotlinlang.org logo
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
  • k

    krtko

    07/28/2017, 11:56 PM
    Has anyone tried tying Godot’s C API Interface to Kotlin Native yet? https://godotengine.org/article/dlscript-here
    :kotlin: 3
    g
    s
    • 3
    • 8
  • r

    roamingthings

    07/29/2017, 5:18 AM
    I wonder if kotlin-native also aims to run on ARM based MCUs like STM32 eventually
    n
    o
    • 3
    • 4
  • f

    fabianterhorst

    07/29/2017, 9:17 AM
    Is it possible to call klib functions from an shared library?
    o
    • 2
    • 1
  • d

    draciel

    07/29/2017, 12:27 PM
    Is there any support for Kotlin-Native in CLion or something similar? I am looking to create simple project in kotlin-native with vulkan (as vulkan is written in C I hope there wasn't so many problems).
    e
    • 2
    • 2
  • j

    jkbbwr

    07/30/2017, 12:08 PM
    Can kotlin native emit shared objects
    👍 1
    o
    • 2
    • 3
  • k

    kyonifer

    08/03/2017, 5:31 PM
    is using a C main function a supported use case for the
    -nomain
    flag? I've been trying to get something like
    konanc -nomain foo.kt -linkerOpts main.o -e main
    to work (where main.c is a C hello world) but i'm getting stuck on
    function Konan_start: error: undefined reference to 'EntryPointSelector'
    , wondering if theres an obvious flag im missing
    a
    • 2
    • 2
  • k

    kyonifer

    08/03/2017, 5:32 PM
    alternatively, is there any way to get a .so from the K/N bitcode? i've tried rolling my own with
    llc -relocation-model=pic
    on the emitted bc but eventually get stuck at the deps being compiled without fPIC
  • e

    elizarov

    08/07/2017, 5:08 AM
    @benleggiero Not yet, but there is a work in progress for one of the upcoming releases.
    ➕ 1
    a
    b
    • 3
    • 5
  • n

    napperley

    08/08/2017, 8:04 AM
    Roughly how big in size (KB) is the Kotlin Native runtime and standard lib? Will there be room to put the runtime and standard lib on a diet 📏 if they are too big to fit into a Uc's flash (ROM)?
    o
    • 2
    • 3
  • k

    krotki

    08/08/2017, 11:53 AM
    i think this one : https://github.com/JetBrains/kotlin-native/pull/365/files
    n
    o
    • 3
    • 3
  • a

    andreasmattsson

    08/08/2017, 12:29 PM
    I'd like to have a common source set for both a JVM library and a KLib, but I'd like the JVM library to have nice Java Interop so I have a few
    @JvmStatic
    and
    @Throws
    annotations thrown in there. These are however giving me
    error: Unresolved reference
    in the compileConan task. Anyone got suggestions for how to deal with this with a common codebase? I thought maybe I'd create typealiases to dummy annotations for these in the Kotlin/Native library. But then I don't know how to deal with the annotation argument for Throws... (KClass also doesn't exist for Native). edit: (using the Konan Gradle Plugin)
    r
    k
    j
    • 4
    • 5
  • d

    drako

    08/08/2017, 2:21 PM
    but as soon as I add plugins { konan } I get "build.gradle.kts:16:5: Unresolved reference: konan"
    k
    • 2
    • 4
  • l

    lukas.mega

    08/09/2017, 2:52 PM
    Hi kotliners! Will be possible to use Kotlin/Native for Arduino (or some other microcontrollers)? Is it in consideration? Thanks for answers.
    n
    • 2
    • 1
  • j

    jlleitschuh

    08/09/2017, 3:26 PM
    Question: Can Kotlin native generate C header files so that kotlin can be called as a library by C code?
    o
    • 2
    • 4
  • n

    napperley

    08/11/2017, 1:01 AM
    Does Kotlin Native allow access to the stack?
    o
    • 2
    • 1
  • r

    raulraja

    08/11/2017, 8:10 PM
    Porting libs that depend on the JDK unchanged. Scala native supports that and I was wondering if Kotlin native would to.
    o
    • 2
    • 1
  • k

    kenkyee

    08/11/2017, 11:19 PM
    But uCs almost always have some sort of posix lib with a layers you implement for the platform.
    n
    • 2
    • 2
  • k

    kenkyee

    08/11/2017, 11:20 PM
    And linkers should strip unused code like proguard does on Android
    n
    m
    • 3
    • 4
  • m

    msink

    08/11/2017, 11:28 PM
    For now Kotlin/Native generates order of magnitude bigger and slower code compared to plain C equivalent.
    n
    o
    n
    • 4
    • 22
  • m

    msink

    08/11/2017, 11:40 PM
    So anyway it is not usable for Ucs with a few kilobytes of memory. For bigger devices with tens of megabytes and embedded linux - well, why not.
    👍 1
    n
    • 2
    • 9
  • m

    maku

    08/12/2017, 6:15 PM
    http://justmaku.org/2017-06-07-kotlin-on-ios
    👍🏽 12
  • a

    andreasmattsson

    08/14/2017, 2:15 PM
    I could use inre error handling in kotlin native. I'm trying to enumerate the contents of a directory with
    readdir
    from
    dirent.h
    . I have the following code:
    while (true) {
                        val ep = readdir (dp)
                        if (ep == null) break
                        val str = ep.pointed.d_name.toKString()
                        println(str)
                    }
    This works for some dirs but not all. On some, I get the following partway through the enumeration:
    terminate called after throwing an instance of 'utf8::invalid_utf8'
      what():  Invalid UTF-8
    The execution terminates immediately. How do I catch/recover from this error? I've tried wrapping with try/catch Throwable to no avail.
    t
    • 2
    • 4
  • g

    groostav

    08/15/2017, 8:28 AM
    I mean, remembering that fortran doesnt have exception semantics, what can I do when it invokes a language that does?
    e
    • 2
    • 3
  • d

    darkmoon_uk

    08/18/2017, 10:32 AM
    Kotlin Native integrates with LLVM, LLVM can target the AVR microcontroller... size-wise, what is the chance of compiling (very simple) Kotlin for a target as small as an 8-bit AVR? Is there too much dependant bootstrap code even for the most simple 'hello world' or is this possible?
    n
    • 2
    • 2
  • d

    darkmoon_uk

    08/18/2017, 10:36 AM
    I will try.
    👀 1
    🌺 3
    n
    • 2
    • 1
  • s

    sksk

    08/19/2017, 11:57 AM
    if your device is connected i believe it'd need relatively big memory to receive data from internet, i don't think making something to blink is a real world usage
    m
    n
    • 3
    • 4
  • j

    jimn

    08/21/2017, 3:34 AM
    what exists for native implementation to instrument method calls and functions?
    o
    • 2
    • 4
  • j

    jkbbwr

    08/23/2017, 4:18 PM
    does it have some bindings etc
    o
    • 2
    • 1
  • e

    elect

    08/24/2017, 8:29 PM
    any news about the incoming ide?
    o
    n
    +2
    • 5
    • 6
  • g

    gildor

    08/25/2017, 6:43 AM
    I’m curious. Gradle just published big blog post about future of native build support. https://blog.gradle.org/state-and-future-of-the-gradle-software-model They deprecated Software Model and will continue evolution of native build support with current build model. I know, that kotlin-native has own plugin and not related somehow to Software Model. But it would be nice if kotlin-native plugin would be compatible with new Gradle plugins for cpp and swift and some upcoming features of other native plugins on Gradle
    🎉 1
    🔥 4
    s
    n
    s
    • 4
    • 7
Powered by Linen
Title
g

gildor

08/25/2017, 6:43 AM
I’m curious. Gradle just published big blog post about future of native build support. https://blog.gradle.org/state-and-future-of-the-gradle-software-model They deprecated Software Model and will continue evolution of native build support with current build model. I know, that kotlin-native has own plugin and not related somehow to Software Model. But it would be nice if kotlin-native plugin would be compatible with new Gradle plugins for cpp and swift and some upcoming features of other native plugins on Gradle
🎉 1
🔥 4
s

sksk

08/25/2017, 11:58 AM
I never been a fan of gradle, all it does is slow down building
maybe it'll change with java AOT compilation, but that's not for the near future
n

napperley

08/26/2017, 2:00 AM
scellow - Would you be willing to approach Cedric about getting Kobalt to support Kotlin Native? Kobalt is supposed to be significantly faster than both Gradle, and Maven when it comes to building Kotlin based projects.
s

sksk

08/26/2017, 5:33 PM
I'd prefer to stay away from JVM based tools for compiling stuff, maybe if it is AOT compiled why not, i don't want to rely on a deamon for a compiler to be fully usable
i hope kotlin compiler will be ported to native at some point 😛
👍 1
g

gildor

08/27/2017, 4:43 AM
@sksk Gradle native builds use system native compilers, Gradle used only for configuration
s

spierce7

09/07/2017, 4:06 PM
My experience has been that Gradle is fast, and seems to only be getting faster. I've fallen more in love with it the faster it makes things.
View count: 5