Skip to content

This is example for Kotlin/Native and comparsion java.net.* with libcurl

Notifications You must be signed in to change notification settings

TheSirCororo/KotlinNativeExample

Repository files navigation

KotlinNativeExample

This is example for coding with Kotlin/Native, linking C libraries and comparison java.net.* with libcurl

Running

Running mingw64 (Windows x64) target

  1. Run gradlew runDebugExecutableMingw
  2. Stop task after getting error
  3. Copy libcurl_win/bin/libcurl-x64.dll and cacert.pem to run directory (this is build/bin/mingw/debugExecutable by default for mingw target)
  4. Again run gradlew runDebugExecutableMingw

Change checking URL

  1. Go to build.gradle.kts
  2. Find lines
binaries {
    executable {
        runTask.let { task ->
            task?.args("https://example.org/")
        }
        entryPoint = "main"
    }
}
  1. Change task?.args("https://example.org/") to task?.args("[YOUR CHECKING URL]")
  2. Run

Running JVM target

  1. Run gradlew jvmJar
  2. Go to build/libs directory
  3. Open terminal and run java -jar KotlinNativeApp-1.0-all.jar <url>

Used Libraries

  1. libcurl for Windows for mingw and linux (to-do) target
  2. java.net.* for JVM target

TO-DO

  • Add linux target support
  • Add macos target support

About

This is example for Kotlin/Native and comparsion java.net.* with libcurl

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published