Live data from Hacker News

Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

github.com

11–20 of 41 posts

Re: Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

#11

Hey HN, I built SyncKit after shipping two local-first projects (RestBolt and Graft) and realizing there's no simple way to add cross-device sync. The problem: Existing solutions are either too complex (Automerge/Yjs require learning CRDTs) or too restrictive (Firebase isn't truly local-first, Supabase has no offline support - issue #357 has been open 4+ years with 350+ upvotes). SyncKit is the middle ground: simple…

TLA+ checked! Whoa!

Thanks! The TLA+ modeling actually caught 3 bugs even before I wrote any code. Worth the upfront investment. It's way easier to debug a state machine model than distributed sync logic.

Happy to share more about the verification approach if you're interested!

Re: Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

#12

Good work @danbitengo Is this usable in native Android app development?

Thanks! For native Android, not directly yet because v0.1.0 is Rust → WASM → TypeScript (web/Node/Deno/Bun).

But since the core sync engine is pure Rust, native Android bindings are definitely possible. The main paths would be:

1. JNI bindings directly from Rust

2. Or using the existing WASM core with a JVM WASM runtime

Haven't prioritized this yet since v0.1.0 focused on web/JS ecosystem, but if there's demand for Android, I could explore it. Are you working on something that needs offline sync on Android?

Re: Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

#14
post #8

This is impressive! After Realm depreciation I have been trying many different offline sync options, they are especially few on Dart… Dart-Rust binding generator is pretty great though so it’s nice this is in Rust. Will keep an eye on this.

Thanks! Yeah, Realm's shift in direction left a gap in the offline-first space. I didn't build Dart bindings yet (Rust → WASM → TypeScript for v0.1.0), but since the core is in Rust, Dart bindings via dart_rust_bridge are definitely feasible. Would actually be a great addition. Are you actively looking for a Realm replacement for a Dart project? Curious what your offline sync requirements are. It might help me priori…

I use Loro CRDT, which is written in Rust as well, on my Dart apps with flutter_rust_bridge and it works pretty well. For syncing I'm using their Loro protocol product although I used iroh before. However, the annoying thing about how the CRDT libraries work is that they're essentially key value NoSQL type storage, not relational. I would love something like SQLite or Postgres on both the server and client that can sync, which companies like ElectricSQL have, but no Dart bindings and also I'd prefer to be in the all Rust ecosystem as well as self host.

Re: Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

#15
The conflict resolution guide seems quite clear:

https://github.com/Dancode-188/synckit/blob/main/docs/guides...

But I’m a little confused about why it says “Zero data loss with automatic conflict resolution” on the top level page and “data loss possible” under the disadvantages of last-write-wins conflict resolution. It makes sense that you have to start somewhere, but to my mind, last-write-wins isn’t really conflict resolution? What does using this library solve?

I guess it means edits to different fields don’t conflict. But if it’s the same field, it will get clobbered.

Re: Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

#18

Earlier quoted context omitted.

TLA+ checked! Whoa!

Thanks! The TLA+ modeling actually caught 3 bugs even before I wrote any code. Worth the upfront investment. It's way easier to debug a state machine model than distributed sync logic. Happy to share more about the verification approach if you're interested!

VERY interested, are you planning on writing a blog? If so I would definitely read that post.

Re: Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

#19

Hey HN, I built SyncKit after shipping two local-first projects (RestBolt and Graft) and realizing there's no simple way to add cross-device sync. The problem: Existing solutions are either too complex (Automerge/Yjs require learning CRDTs) or too restrictive (Firebase isn't truly local-first, Supabase has no offline support - issue #357 has been open 4+ years with 350+ upvotes). SyncKit is the middle ground: simple…

The ReadMe says "Zero data loss with automatic conflict resolution (Last-Write-Wins)", bur doesn't LWW guarantee data loss?

Re: Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

#20

Earlier quoted context omitted.

TLA+ checked! Whoa!

Thanks! The TLA+ modeling actually caught 3 bugs even before I wrote any code. Worth the upfront investment. It's way easier to debug a state machine model than distributed sync logic. Happy to share more about the verification approach if you're interested!

Please do in the repo, and thank you for the wonderful contribution on multiple fronts. This is very well done work and documentation. A few tips to help others discover the value on the Readme: Add the key memory benchmark (currently just above the acknowledgments) to the top of the Readme and link to the rest of the benchmarks on the page that you already have (maybe rename it benchmarks.md in the process): https://github.com/Dancode-188/synckit/blob/main/docs/guides...
Post reply on HN