Sqlx4k - Interoperability between Kotlin and Rust, using FFI (Part 1)

Introduction Previously, in the Sqlx4k - Introduction to Kotlin Native and FFI (Part 2), the second part of this series, we attempted to provide an introduction to how C Interoperability functions in Kotlin, offering various examples from the GitHub - smyrgeorge/sqlx4k codebase. Sqlx4k is a small, non-blocking PostgreSQL database driver written in Kotlin for the Native platform. It wraps the sqlx driver from the Rust ecosystem under the hood. The communication between the two languages is facilitated using FFI....

August 1, 2024 · 6 min · 1208 words · Yorgos S.

Sqlx4k - Introduction to the Kotlin native and FFI (Part 2)

Introduction In the previous part of this series, I attempted to explain the importance of the Kotlin FFI (Foreign Function Interface) compatibility layer. As I mentioned, I believe it is a very effective way (at least for now) to leverage other ecosystems (such as the Rust ecosystem) to bring functionality to the Kotlin/Native ecosystem, in which I see a great deal of potential. FFI Foreign Function Interface (FFI) is a programming feature that enables code written in one language to call and interact with code written in another language....

July 16, 2024 · 8 min · 1611 words · Yorgos S.

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....

July 8, 2024 · 6 min · 1200 words · Yorgos S.

My First Post

This is my-first-post, just checking that everything works correctly. fun main() { println("Hello world!") }

July 7, 2024 · 1 min · 15 words · Yorgos S.