Jsoup is a JVM library, you can’t use it in native.So either you are searching for native replacement, or write it yourself.
If you are newbie, please do not use Kotlin-Native. It is in beta and require’s both kotlin knowledge and native development knowledge at the same time. Stick with JVM for now.
Thanks for your reply. I know that jsoup cannot be used in native and I’ve indicated that in my initial post. As you correctly indicated, one of the methods is to search for a replacement. This is exactly what I’m doing. Are you aware of any?
There is currently no library like Jsoup for K/N, but you can get away by combiing Ktor http-client with a C library like gumbo.
Of course this will be a bit of work, you’ll have to write a wrapper around the C library to make it easy to use in Kotlin, but it’s the best approach I can see right now.
I recommend checking out https://github.com/fleeksoft/ksoup, I developed it to be a Kotlin Multiplatform port of jsoup, mirroring most of its features while currently excluding servlet and cookie handling. It’s designed to offer a familiar experience for those already accustomed to jsoup’s capabilities in a Kotlin Multiplatform environment. Feel free to give it a try and share any feedback or suggestions you might have!