Hi, apart from file I/O, what are the future plans...
# io
s
Hi, apart from file I/O, what are the future plans for kotlinx-io APIs? Can we expect some kind of Process (like ProcessHandle) or Signal Handler API to be added to kotlinx-io that will work on all native platforms?
f
Hey! There are two main short term goals: • provide files and filesystem API (as you mentioned); • stabilize existing API. After stabilization, there's a plan to try moving some of the interfaces to Kotlin Stdlib. Beside that, there is an async API proposal that is currently on pause, but we might reconsider it. Yet another paused proposal is supporting
ByteBuffers
as a `kotlinx.io.Buffer`'s backing storage on JVM (mainly, for the sake of supporting Direct byte buffer). There's a chance something is still could be done here. That'll come with some changes in public API too. A less clear direction of development is supporting charsets. Charsets are something worth having, but that's the only certain thing about that. 🙂
👍 1
As of process spawning and signal handling APIs, it was not on the table. Mainly, because there were no related feature requests. Are there any particular scenarios for such an API you have in mind? Using K/N for backend-services as an alternative to K/JVM (or K/JVM + GraalVM)? Or for writing command line tools distributed as standalone binaries?
s
Are there any particular scenarios for such an API y
Yes, using Kotlin/Native as an alternative to the K/JVM. We’re developing a deployment agent that should work on both Linux and Windows. We are planning to use Kotlin Multiplatform with Ktor (for WebSocket support). We’re interested in Kotlin/Native due to its smaller binary size, relatively faster startup time, and cross-compilation capabilities. As the Kotlin/Native ecosystem is less mature than the JVM’s, we may occasionally need to rely on native tools to accomplish specific tasks. A ProcessBuilder/exec-like API would serve as a fallback mechanism in such situations. It would be really helful to have such a fundamental API within kotlinx-io that supports all native platforms.
👀 1