kotlin-csv icon indicating copy to clipboard operation
kotlin-csv copied to clipboard

Kotlin/Native Support

Open doyaaaaaken opened this issue 6 years ago • 17 comments
trafficstars

https://kotlinlang.org/docs/reference/multiplatform.html

doyaaaaaken avatar Aug 22 '19 13:08 doyaaaaaken

Are there any bottlenecks preventing you from also targeting native?

luca992 avatar Apr 24 '21 19:04 luca992

No, there's no bottleneck. But I wait to implement it because the multiplatform feature is now experimental and I don't see how big the need for the multiplatform feature is in kotlin-csv. If this feature is needed, I'll consider it. Feel free to request it, and tell me the detail of the use case.

doyaaaaaken avatar Apr 26 '21 02:04 doyaaaaaken

Got it, I was able to parse a csv with okio's new multiplatform file system feature so I'm all good now. You might find it interesting.

luca992 avatar Apr 26 '21 02:04 luca992

@doyaaaaaken my team is interested in multiplatform version of kotlin-csv. We are developing a client-facing SDK that cross-compiles to JVM/Android/iOS/JS (both browser and NodeJS). I understand that some features would be unimplementable, specifically those working with files from browser, so some analysis would have to done in that respect.

We can probably even spare some manpower to work on enabling such support in kotlin-csv if you agree on the general direction.

itegulov avatar May 21 '21 01:05 itegulov

@itegulov Thank you very much. I would be very grateful for your help.

As you can see from the following code, the common code is in the form of receiving String type as an argument, and the rest is defining methods to receive each platform's own type (java.io.File type for Java) as an argument.

The first thing we would like to do is to make the minimal code defined in [the multiplatform code](https://github.com/doyaaaaaken/kotlin-csv/blob/master/src/commonMain/kotlin/com/github/doyaaaaaken/kotlincsv/client/ CsvReader.kt) work on a specific platform (e.g. JS). What form of help would you be able to provide?

doyaaaaaken avatar May 22 '21 13:05 doyaaaaaken

@doyaaaaaken I see. Let me take this discussion internally and I will get back to you on our plans.

itegulov avatar May 25 '21 05:05 itegulov

The Kotlin/JS feature is implemented by #30. (released at version 1.0.0.) This issue is renamed into "Kotlin/Native Support".

doyaaaaaken avatar Aug 22 '21 13:08 doyaaaaaken

I don't know why this library is listed as "A pure kotlin simple csv reader/writer." when it only supports Kotlin JS or Kotlin JVM (and not actual Kotlin native).

What would be needed to take it completely Kotlin native actually?

mevdev avatar Dec 02 '22 00:12 mevdev