Sqlx4k - Introduction to the Kotlin native and FFI (Part 1)
Introduction Recently, I began experimenting with the Kotlin Native platform. I initiated a new repository and attempted to create a simple project utilizing the ktor libraries. The purpose of the project was to recreate a small service that integrates some basic libraries and compile it to a native target (macosArm64 in my case). The service aimed to offer support for:
Dependency injection HTTP server Database access (PostgreSQL) Additionally, RabbitMQ support (though it isn’t a priority for now) In this first article of the series, I aim to describe how I ended up writing “low-level” code (FFI between Kotlin and Rust) and also to highlight the importance of native compatibility in Kotlin Native. In the subsequent parts, I’ll attempt to provide more detailed examples of how I managed to implement a simple SQL driver for PostgreSQL, using the sqlx (Rust) library.
:: exploration and stuff ::