Hello, sorry if this is a very basic question I h...
# server
i
Hello, sorry if this is a very basic question I have base experience as a backend developer using golang. I only moved to Kotlin recently, and I want to use a library I wrote in golang for my current project. I tried to read articles and documentations, for example this one: https://kotlinlang.org/docs/multiplatform-library.html Question: is there a good example how a proper and production ready library of a kotlin project should look like? a good simple library would do, I just need to understand how things are written in kotlin before I will be confident enough to write my old golang library to kotlin/java. It would be great if the library is simple enough to learn from. For context, the library is a utility library that can be use in all backend/frontend/android projects. Thank you in advance!
a
If you’re looking for solid examples, I think kotlinx libraries is a good source to learn. kotlinx-datetime, kotlinx-serialization - to name a few
c
Since you use Golang (only for server side devt) you are probably not interested in multiplatform Kotlin: the JVM is all you need.
In that case you should not overlook using your Golang code with some IPC mechanism or are a standalone service that listens on a network port. You do not always need FFI (but for some usecases you sure need it).
i
@antonarhipov I see, I will try to learn a few from kotlinx libraries
@Cies for now, yeah I think JVM only would be enough. However because the nature of this library is a utility and can be used for front/mobile dev, I think it would be a good idea to also write in in multiplatform
l
Hi @Ishlahul Hanif, checking Kotools Types may help you on learning how to create a multiplatform library with Kotlin. This is a simple library providing explicit types for all platforms.