🔀 SSIO


Streaming Suspend Input Output library for Kotlin Multiplatform.
This is an async IO extension for kotlinx.io based on the async API proposal.
Features
Platforms
The following matrix illustrates what implementations are used for which target & runtime combination
in the ssio-core implementation:
NOTE: Implementations marked with an asterisk* are used only when the underlying system supports them.
Why should I use this over kotlinx.io or java.nio?
The answer is simple: you shouldn't if you don't need a suspend IO API available in your common source set.
If you do, this library is probably what you're looking for.
How to use it
First, add the official Maven Central repository to your settings.gradle.kts:
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}
Then add a dependency on the library in your root buildscript:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("dev.karmakrafts.ssio:ssio-core:<version>")
}
}
}
}
Or, if you are only using Kotlin/JVM, add it to your top-level dependencies block instead.
How to build it
In order to build SSIO, simply clone this project and run the publishToMavenLocal task:
./gradlew publishToMavenLocal
Or on Windows:
gradlew publishToMavenLocal
Extra steps on Linux
Since the library is built against liburing on Linux, you need to have Linux headers available
under /usr/src/linux-headers. If you need to install them, you can use the provided install_linux_headers.sh
script from the root of the repository.
This assumes a Debian based system and requires the following dependencies to be installed:
Ubuntu/PopOS
build-essential make automake autoconf pkg-config pkgconf libtool gcc bison flex
Official build support for other distributions may be requested.