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

    Animesh Sahu

    04/06/2021, 4:29 AM
    Alternative for thread pools in K/N? Or depend on C-libs probably? How does multithreaded-threaded coroutines K/N manages it?
    a
    k
    +2
    • 5
    • 9
  • b

    Big Chungus

    04/06/2021, 10:24 PM
    Commonizer for [mingwX64, mingwX86] is failing on Windows Server amd64 (logs in thread). Anyone knows if this is expected due to different architectures?
    l
    m
    • 3
    • 12
  • p

    Peter Hsu

    04/07/2021, 4:59 PM
    I have a crash that doesn't give me much information, how can I get better crash information than the following:
    Crashed: com.apple.root.utility-qos
    SIGABRT ABORT 0x00000001bfed5414
    0
    libsystem_kernel.dylib
    __pthread_kill + 8
    1
    libsystem_pthread.dylib
    pthread_kill + 272
    2
    libsystem_c.dylib
    abort + 104
    3
    GaiaProgress
    ObjHeader::createMetaObject(TypeInfo**) + 4344939580
    4
    GaiaProgress
    TerminateWithUnhandledException + 4344970116
    5
    GaiaProgress
    KonanTerminateHandler() + 4344969660
    6
    libc++abi.dylib
    std::__terminate(void (*)()) + 20
    7
    libc++abi.dylib
    std::terminate() + 44
    8
    libobjc.A.dylib
    _objc_terminate() + 14
    9
    libdispatch.dylib
    _dispatch_client_callout + 40
    10
    libdispatch.dylib
    _dispatch_root_queue_drain + 656
    11
    libdispatch.dylib
    _dispatch_worker_thread2 + 116
    12
    libsystem_pthread.dylib
    _pthread_wqthread + 216
    13
    libsystem_pthread.dylib
    start_wqthread + 8
    b
    • 2
    • 3
  • n

    napperley

    04/08/2021, 2:37 AM
    Does Kotlin Native have any facilities available that make it easier to manage buffers? Below is a code snippet that combines image files into a single file:
    internal actual fun combineImageFiles(dirPath: String) {
        val appendBinaryMode = "ab"
        val readBinaryMode = "rb"
        val arena = Arena()
        val entries = listDirectory(dirPath).sortedWith(ImageNameComparator())
        val videoFile = fopen("$dirPath/video.mjpg", appendBinaryMode)
        entries.forEach { e ->
            val dataSize = fileSize("$dirPath/$e")
            val tmpFile = fopen("$dirPath/$e", readBinaryMode)
            val data = arena.allocArray<ByteVar>(dataSize.toInt())
            fread(__n = 1, __stream = tmpFile, __ptr = data, __size = dataSize)
            fclose(tmpFile)
            fwrite(__n = 1, __s = videoFile, __ptr = data, __size = dataSize)
        }
        arena.clear()
        fclose(videoFile)
        Unit
    }
    This snippet works however it is using multiple buffers which isn't ideal. If there are a lot of image files being handled then the memory usage would become excessive.
    d
    m
    • 3
    • 8
  • t

    Toby

    04/08/2021, 1:27 PM
    How do I properly make this code C++ in Kotlin/Native?
    long ns;
    struct timespec spec;
    clock_gettime(CLOCK_REALTIME, &spec);
    ns = spec.tv_nsec;
    I came up with this Kotlin/Native syntax but I can't access the tv_nsec member of the timespec struct and this is the only working code so far:
    val spec: CValuesRef<timespec>? = null
    clock_gettime(CLOCK_REALTIME, spec)
    to actually access the output, I would need the following code (right)?:
    var ns: Long
    val spec: CValuesRef<timespec>? = null
    clock_gettime(CLOCK_REALTIME, spec)
    ns = spec.tv_nsec
    So, how do I correctly do this?
    m
    • 2
    • 4
  • m

    Mohan Babu Malairaj

    04/09/2021, 4:43 AM
    Dear Community I have a use case where i have to add couple of values to data store, we are already in the process of moving away from shared preferences, inside a library but i already have a data store created for main app module as there was a need earlier. 1. Move the entire data store manager class to library so that both main and app module can access it - If i add a new module then this becomes a pain point so this should not be a good choice - please correct me if i am wrong. 2. create a new data store in a different name for the library module and use it Please let me know your feedback. Thank you!
    :not-kotlin: 4
    • 1
    • 1
  • i

    Ivan Đorđević

    04/09/2021, 8:47 AM
    Is there a mechanism for adding additional arbitrary metadata to Obj-C headers generated by Kotlin/Native? Say, in form of comments or something similar
    p
    • 2
    • 1
  • g

    Gavin Ray

    04/12/2021, 1:52 AM
    Is there an annotation like
    @cdecl("name")
    or something similar I can use for controlling the name of an exported Kotlin function in a DLL? I have to create a DLL with a particular entrypoint function name (loaded by name, by a third-party application) and currently the only solution I can think of is to create a wrapper C file like:
    __declspec(dllexport) int Entrypoint(_args) {
      kotlinmain(_args)
    }
    j
    • 2
    • 3
  • n

    napperley

    04/12/2021, 4:38 AM
    Running into this issue where cinterop generation for libjpeg fails with the following error:
    Exception in thread "main" java.lang.Error: /usr/include/jpeglib.h:792:3: error: unknown type name 'size_t'
    Below are the contents of the def file:
    headers = jpeglib.h
    linkerOpts = -ljpeg
    linkerOpts.linux_x64 = -L/usr/lib/x86_64-linux-gnu
    The following include paths are used in the build file:
    "/usr/include", "/usr/include/x86_64-linux-gnu"
    j
    • 2
    • 11
  • l

    louiscad

    04/12/2021, 9:32 PM
    Got my hands very dirty today with C++/Arduino code, and I am seriously considering finding a way to generate that C++ from Kotlin code (because Kotlin is easier to write and read as a human). Why not directly to machine code? First, I have no idea how to generate correct machine code that could run on AVR microcontrollers. Second, I don't see myself checking the generated machine code, while for C++, it's doable to a certain extent. Would someone want to brainstorm that idea with me?
    👀 1
    a
    g
    +2
    • 5
    • 18
  • n

    napperley

    04/13/2021, 1:54 AM
    Is it possible to do cinterop with just a Gradle build file, and no def files?
    a
    d
    • 3
    • 2
  • k

    KamilH

    04/13/2021, 5:56 AM
    Is it a known issue that we can’t call inline reified function as a method reference in Kotlin Native, because it causes
    unsupported call of reified inlined function
    ? Example in thread
    • 1
    • 2
  • e

    eirikb

    04/13/2021, 7:20 PM
    Is it possible to use pure sockets with kotlin-native? Normal client socket. After some searching it seems my best bet is ktor-network, but I'm not quite able to get the example to run. At the moment it's stuck at not being able to resolve "ActorSelectorManager". Could be it's Android-specific? I got a normal console app
    m
    v
    t
    • 4
    • 63
  • g

    Glen

    04/13/2021, 7:22 PM
    Hello everyone. Please has anyone tried using Rust with Kotlin/Native?
    b
    a
    • 3
    • 4
  • c

    Clocks

    04/14/2021, 3:28 PM
    I've been attempting to convert a list into a va-list. But I have been having issues with which 'va_list' the code is pointing to
    e: /mnt/bulk/SourceCode/git/kotlinx-gtk/nativex/src/nativeMain/kotlin/nativex/glib/Variant.kt: (53, 4): Type mismatch: inferred type is va_list /* = CPointer<platform.posix.__va_list_tag> */ but va_list? /* = CPointer<platform.builtin.__va_list_tag>? */ was expected
    Is the error I get, but
    platform.builtin
    has no members I can see
    m
    • 2
    • 2
  • s

    serebit

    04/14/2021, 4:56 PM
    So this started appearing after an update to v1.5.0-RC... I'm assuming it's beneign, but I haven't set any manual test dependencies, so this is just kinda happening now.
    s
    • 2
    • 1
  • s

    serebit

    04/14/2021, 7:13 PM
    Different question, why was the
    linux_x64
    linker changed from ld.lld to ld.gold in Kotlin v1.5.0?
    s
    • 2
    • 1
  • u

    uli

    04/14/2021, 7:50 PM
    Hi all, I’d like to use a pattern where I have an abstract class
    A
    with an abstract property (
    a
    ) and a class
    B
    which overrides property
    a
    . Now
    A
    lives in the K/N world and I want
    B
    to be
    @Published
    . I suppose there is no way to express the
    @Published
    annotation in K/N so
    B
    must be written in Swift. Now Swift does not know about abstract classes and thinks
    a
    was a stored property and complains:
    Cannot override with a stored property 'counter'
    Do you guys see any way to get a subclass of Kotlin cass
    A
    with
    @published
    property
    a
    ?
    r
    m
    • 3
    • 4
  • s

    Shabinder Singh

    04/15/2021, 7:08 AM
    I am trying to setup curl in my multiplatform project by following this guide: https://kotlinlang.org/docs/curl.html#generate-bindings But when I try to add Interop to host targets , it doesn’t get recognised by IDE…. Any help is appreciated!
    s
    • 2
    • 16
  • s

    serebit

    04/15/2021, 4:42 PM
    How bad of an idea is it to pass variable-capturing lambdas as StableRefs to C callbacks? i.e. pass my callback function as the data pointer, and make the static C function unwrap and call it. Example in thread.
    d
    c
    • 3
    • 5
  • a

    ankushg

    04/15/2021, 10:10 PM
    Does anyone have a way of highlighting exceptions on iOS for methods that weren’t tagged with
    @Throws
    ? Recently got burned because we forgot to add that annotation to a method and the crashes weren’t even getting sent up to Crashlytics 😅
    b
    r
    • 3
    • 4
  • d

    Daniele B

    04/16/2021, 9:21 AM
    9 months ago there was the announcement that a new memory model for Kotlin/Native was being developed. Do we have any news about it? Any idea when this will see the light?
    👀 9
    🇳🇴 2
    • 1
    • 1
  • m

    Milan Hruban

    04/18/2021, 8:37 AM
    Is there a way to register a shutdown hook in native? Equivalent with this on JVM:
    Runtime.getRuntime().addShutdownHook(Thread {
            println("shutting down")
        })
    d
    • 2
    • 2
  • v

    Victor ADĂSCĂLIȚEI

    04/18/2021, 1:08 PM
    Hey all. I’ve started getting
    Project 'kotlin-native' not found in root project 'kotlin'
    when trying to compile
    kotlin-native
    via
    ./gradlew :kotlin-native:dist
    Anyone also experiencing this? I’m using the latest master commit.
    e
    • 2
    • 3
  • b

    Big Chungus

    04/19/2021, 4:53 PM
    Are there any plans to add destructors to kotlin native at least? It would make developing mpp libraries that use cinterops on the native side that much easier...
    n
    • 2
    • 2
  • u

    ultraon

    04/20/2021, 8:01 AM
    Hello, Guys, please help with some hints https://kotlinlang.slack.com/archives/CRDCFF3RC/p1618789475054600
    y
    • 2
    • 2
  • n

    ntherning

    04/20/2021, 8:46 AM
    Hi, On Kotlin Native 1.4.32 this simple test crashes with a segmentation fault in the iOS simulator:
    import kotlin.test.Test
    import kotlin.test.assertEquals
    
    class Test {
        @Test
        fun stackOverflowOnRegexReplace() {
            val regex = Regex("[a]+")
            val input = "a".repeat(10_000)
            val output = regex.replace(input, "")
            assertEquals("", output)
        }
    }
    The reason is a stack overflow. There is too much recursion in the Regex classes on Kotlin Native, see the condensed call stack below. The crash happens when the input string is about 6300 characters long. On my iPhone 12 it happens much earlier, the input only has to be about 620 characters. I guess it depends on the target arch, optimizations, etc, how deep the call stack is before the crash happens. Is this a known issue? Or should I report it?
    clock_gettime 0x00007fff20081334
    std::__1::chrono::steady_clock::now() 0x00007fff202a0d72
    konan::getTimeMicros() 0x000000010d2496d9
    (anonymous namespace)::garbageCollect(MemoryState*, bool) 0x000000010d213acc
    ObjHeader* (anonymous namespace)::allocInstance<true>(TypeInfo const*, ObjHeader**) 0x000000010d21f9aa
    kotlin.native.BitSet.<get-asBitCoordinates>#internal BitSet.kt:61
    BitSet#get BitSet.kt:344
    kotlin.text.regex.CharClass.object-18.contains#internal CharClass.kt:497
    AbstractCharClass#contains AbstractCharClass.kt:68
    SupplementaryRangeSet#contains SupplementaryRangeSet.kt:127
    SupplementaryRangeSet#matches SupplementaryRangeSet.kt:108
    GroupQuantifierSet#matches GroupQuantifierSet.kt:75
    SupplementaryRangeSet#matches SupplementaryRangeSet.kt:109
    GroupQuantifierSet#matches GroupQuantifierSet.kt:75
    SupplementaryRangeSet#matches SupplementaryRangeSet.kt:109
    GroupQuantifierSet#matches GroupQuantifierSet.kt:75
    ... (about 10000 repeating lines)
    SupplementaryRangeSet#matches SupplementaryRangeSet.kt:109
    GroupQuantifierSet#matches GroupQuantifierSet.kt:75
    SupplementaryRangeSet#matches SupplementaryRangeSet.kt:109
    GroupQuantifierSet#matches GroupQuantifierSet.kt:75
    SupplementaryRangeSet#matches SupplementaryRangeSet.kt:109
    GroupQuantifierSet#matches GroupQuantifierSet.kt:75
    AbstractSet#find AbstractSet.kt:95
    AbstractSet#find _Collections.kt:256
    AbstractSet#find AbstractSet.kt:95
    SingleSet#find SingleSet.kt:46
    Regex#find Regex.kt:167
    Regex#find$default Regex.kt:160
    Regex#replace Regex.kt:242
    Regex#replace Regex.kt:234
    Test#stackOverflowOnRegexReplace Test.kt:9
    $Test$test$0.$stackOverflowOnRegexReplace$FUNCTION_REFERENCE$72.invoke#internal Test.kt:6
    $<bridge-UNNN>invoke Test.kt:6
    TestCase#run TestSuite.kt:85
    kotlin.native.internal.test.TestRunner.run#internal TestRunner.kt:241
    kotlin.native.internal.test.TestRunner.run#internal _Collections.kt:1819
    kotlin.native.internal.test.TestRunner.run#internal TestRunner.kt:234
    kotlin.native.internal.test.TestRunner.runIteration#internal TestRunner.kt:265
    kotlin.native.internal.test.TestRunner.runIteration#internal Timing.kt:32
    kotlin.native.internal.test.TestRunner.runIteration#internal TestRunner.kt:265
    kotlin.native.internal.test.TestRunner.runIteration#internal _Collections.kt:1819
    kotlin.native.internal.test.TestRunner.runIteration#internal TestRunner.kt:258
    kotlin.native.internal.test.TestRunner.runIteration#internal Timing.kt:32
    kotlin.native.internal.test.TestRunner.runIteration#internal TestRunner.kt:257
    TestRunner#run TestRunner.kt:280
    TestRunner#run Timing.kt:32
    TestRunner#run TestRunner.kt:277
    test#testLauncherEntryPoint Launcher.kt:22
    test#main Launcher.kt:26
    Konan_start Launcher.kt:25
    Init_and_run_start 0x000000010d08836b
    start 0x00007fff2025a3e9
    start 0x00007fff2025a3e9
    a
    • 2
    • 2
  • n

    Nikolay Kasyanov

    04/22/2021, 2:08 PM
    Hi there, I’m experiencing a similar issue while trying to link a test binary for iOS simulator: https://kotlinlang.slack.com/archives/C3SGXARS6/p1559551834011200 I followed the suggestion in thread and did this:
    iosX64('iosX64').binaries.getByName('debugTest').linkerOpts('-framework Foundation')
    but
    ld
    doesn’t seem to like this option: The difference is that the class is from Foundation (
    NSURLSessionTaskTransactionMetrics
    ) and is only available in iOS 10+. At the moment this class is only used in actual code but not in tests. Btw, is there a way to see full
    ld
    invocations?
    s
    • 2
    • 18
  • d

    Deactivated User

    04/25/2021, 11:26 AM
    Hey guys, regarding to Kotlin/Native runtime performance:
    ❓ 1
    👀 4
    l
    s
    • 3
    • 21
  • a

    apahl

    04/25/2021, 4:11 PM
    Hi, what is the best way to find libraries for K/N?
    n
    a
    +3
    • 6
    • 19
Powered by Linen
Title
a

apahl

04/25/2021, 4:11 PM
Hi, what is the best way to find libraries for K/N?
n

napperley

04/25/2021, 9:59 PM
Maven Central Repository Search if you have a basic idea of what you want to search for: https://search.maven.org/
Package Search IntelliJ plugin if you have a basic idea of what you want to search for: https://plugins.jetbrains.com/plugin/12507-package-search
Kotlin Links (look in the Libraries/Frameworks section): https://kotlin.link/
None of these will show Kotlin Native libraries by target (eg linuxX64).
I don't think anyone has developed a Kotlin Library Browser type app.
a

andylamax

04/26/2021, 1:58 AM
https://kamp.ml
👍 2
s

sergey.bogolepov

04/26/2021, 5:03 AM
https://libs.kmp.icerock.dev/
👍 1
a

apahl

04/26/2021, 6:51 AM
Hi, thanks a lot for all the links, esp. the last one looks interesting! KR Axel
kamp.ml also looks really good. IMO these sites should be advertised more. Many thanks again.
➕ 1
💯 2
n

napperley

04/26/2021, 11:12 PM
Really like the fact that KAMP ( https://kamp.ml/ ) allows multiple targets to be selected for a search unlike the IceRock website. Also the KAMP website allows searching by keywords (picks up my libraries when doing a search for GUI for example) unlike IceRock.
Why isn't KAMP listed on the Kotlin website? KAMP certainly is a gem (very lucky find).
KAMP finds far more libraries with multiple targets than IceRock, below is a random sample: • linuxX64 - KAMP 261, IceRock 53 • linuxArm32Hfp - KAMP 83, IceRock 21 • linuxArm64 - KAMP 55, IceRock 10 • iosArm64 - KAMP 374, IceRock 131 • macosX64 - KAMP 302, IceRock 70 • jvm - KAMP 3549, IceRock 130 • js - KAMP 407 (IR ver), IceRock 110 (non IR ver)
Does KAMP have a REST API?
k

KamilH

04/27/2021, 4:52 PM
I don't know if there is a REST API, but I think it would be best to ask the author: @Big Chungus
b

Big Chungus

04/27/2021, 5:04 PM
There's a rest server behind kamp for sure. You can reverse engineer the api from source code on github.
Also kamp & icerock takes different approaches to package search. Icerock requires an explicit registration of libraries to their repo, that's why you see a lot less of them on the site. It then does nightly fetch of maven data for those libs to update stuff like latest version or description. Kamp, on the other hand, self updates nightly by doing maven central scan, finding all kotlin library artefacts, grouping platform-specific artefacts under a single root artefact and caching required data in mongodb.
I'd be interested to hear your use-case for kamp api, tho.
n

napperley

04/27/2021, 9:35 PM
One use case for the KAMP API is to use it for developing a desktop app. Some users might want to develop a IntelliJ plugin, which would be very useful.
b

Big Chungus

04/27/2021, 10:03 PM
Interesting. I'll work on swagger docs for it over the weekend
:thank-you: 1
View count: 8