Open aSemy opened 1 year ago
I once started a RocksDB Native library version with native C calls here: https://github.com/marykdb/rocksdb-multiplatform/compare/master...native-rework
I got quite far but as far as I remember I got stuck with the custom Comparator I need to implement for MarykDB. https://github.com/marykdb/maryk/blob/909e2f4cd451dd06593e1078733c12abcb27daf9/store/rocksdb/src/commonMain/kotlin/maryk/datastore/rocksdb/processors/VersionedComparator.kt But I am not 100% certain but it had to do with those more custom parts. But maybe I overlooked something in the C api back then.
With RocksDBMultiplatform I try to stay as compatible as possible with the Java SDK of RocksDB so I could use that one for the JVM version. At least I got the RocksDB compilation working for Android, Apple platforms and JVM. Don't know what issues you walked into for the other platforms?
I'd like to make a Kotlin/Native CLI tool for Mac/Windows/Linux, so the issue is that Maryk isn't available. RocksDB isn't critical, it's just a hobby project, but I thought I'd try and help out if I could since I previously tried to bind Kotlin/Native and RocksDB.
Maybe the native C RocksDB Multiplatform implementation could be looked into again to see if we could get it to work? It could also be that I got stuck in how to fit it with the Java RocksDB api now I think about it. But we could make platform specific classes to help with certain use cases.
I once started it to support more platforms but also to be more in control of memory instead of leaving things to objC which caused the coroutines issue I mentioned in the coroutines PR.
For me it is also a hobby project btw. But I have less time to work on it with full focus currently, but I can certainly help with all the things I learned along the way.
Continuation of the discussion in #2
Windows and Linux support is quite important for me, since I don't always work on a Mac.
I thought creating a new issue would be best to gather discussions. But feel free to close as "won't fix" if that's the situation!
I've previously worked on creating Kotlin/Native bindings for RocksDB https://github.com/aSemy/kotlin-on-the-rocksdb, and I did get quite far. I just got stuck on trying to build the RocksDB C library for the different targets while still complying with the weird restrictions Kotlin/Native has regarding generally unavailable gcc versions. I can try picking this up again, and maybe I'll have more luck with Kotlin 1.9.
@jurmous Would you be able to be more specific about the functionality that the C library is lacking? This doesn't have to be an exhaustive list, but some specifics to focus on would help. Cheers!