clockworklabs / clockworklabs/SpacetimeDB
Add Kotlin Multiplatform SDK support
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
This issue tracks reimplementing the work from stale PR #4471, which has been closed because it is too far out of date to merge directly.
Original pull request
- PR #4471: Add Kotlin Multiplatform SDK (JVM + iOS)
- Original author: @AndroidPoet
What the original PR was trying to do
What Kotlin Multiplatform client SDK for SpacetimeDB, targeting JVM and iOS (arm64, simulator-arm64, x64). This brings first-class Kotlin/Java/Swift (via KMP interop) support to the SpacetimeDB ecosystem. Why There's currently no way to build native Android/JVM or iOS clients without going through the Cor Rust SDKs. The Kotlin SDK fills this gap and opens up the entire JVM and Apple platform ecosystem — Android apps, backend services, iOS apps, and any Kotlin target. Architecture - Wire protocol: Full v2.bsatn.spacetimedb support with BSATN binary serialization - Transport: Ktor 3.0.3 WebSocket client (OkHttp engine on JVM, Darwin engine on iOS) - Concurrency: kotlinx-coroutines with Mutex-serialized message handling, atomicfu for transport flags - Compression: Configurable (None/Gzip/Brotli) via withCompression(). Gzip on both platforms via expect/actual, Brotli on JV...
Closure context
- @AndroidPoet This is a very helpful PR! We're planning to add Swift, Go, and Kotlin support in the near future, both on the server and on the client. The wrinkle is that we're currently maintaining a bunch of different SDK codebases separately. Before expanding our language support, we'd like to create a central Rust client "core" which we link with all the different languages. Given that work on that is on going, I'm going to close this PR and create an issue to track it. I don't think this PR will merge as is, but it will be a great reference for our future PR!
Reimplementation notes
- Reimplement this work on top of current
masterin a new PR. - Keep the original PR linked as historical context and as a source of useful implementation ideas where still relevant.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing stale PR #4471 and compare its approach with current master. Reimplement the Kotlin Multiplatform SDK for JVM and iOS, with the listed protocol, transport, concurrency, and compression goals, and confirm the new work is based on current master rather than directly merging the stale PR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100