:loudspeaker: New Release: Ghost Serializer v1.2.3...
# serialization
j
📢 New Release: Ghost Serializer v1.2.3 is out! 👻⚡ We’ve just released version
1.2.3
of Ghost, the byte-first, zero-reflection serialization engine for Kotlin Multiplatform. 🔗 Release Notes & Changelog: github.com/juanchurtado1991/…/v1.2.3 🚀 What's New in v1.2.3: • _Dynamic Perfect Hash Sizing_: The compiler now automatically sizes dispatch tables starting at`128`(scaling up to`8192`on demand). This reduces metadata heap footprint by_50% to 87.5%_for small/medium models. • _Android UI Thread Bypass_: Optimized`getLocalPool()`to cache the main UI thread, completely bypassing`ThreadLocal`lookups on the main thread. • _ByteArray Support_: Native serialization/deserialization for`ByteArray`fields using raw token span capture. • _Robustness & Fixes_: Resolved KSP compilation limits on large models (tested up to 100+ fields), fixed duplicate property collection on overrides, and added`@GhostFallback`support for enums. Our KMP verification suite is now at_825/825 passing tests_! 📊 Now featured on HTTP Arena! Ghost is now listed in the official HTTP Arena Benchmarks! The community benchmarks show
ktor-ghost
achieving: 🚀 +66% higher throughput (RPS) 📉 50% less RAM usage ... compared to standard Ktor configurations. 👉 Check out the official benchmarks: http-arena.com/#sort=rps:-1&q=kotlin 👉 Try the interactive web playground: juanchurtado1991.github.io/ghost-serializer Give it a try in your KMP projects:
Copy code
kotlin
plugins {
    id("com.ghostserializer.ghost") version "1.2.3"
}
Feedback, issues, and stars are highly appreciated! 🌟
j
Looks pretty cool! Do you have a comparison on resulting binary size?
j
Hi Joseph not yet but I can get one, let me get back to you
p
Are there plans for js/wasm targets?
j
Hold up, no JS yet? That's definitely a significant blocker for me; granted I'm probably a bit weird there.
j
We have the wasm sources already and an alpha transpiler for typescript > kotlin DTO. The issue is that the wasm bridge toll takes away the most of the speed benefits. The memory benefits prevail tho. If this is usefull to you please create a task on github and will definitely add it in future versions
j
Honestly, I'm not sure I'll use it anyways; I'm currently abusing the heck out of KotlinX serialization to basically do reflection across platforms, so transitioning is probably not possible anyways. I even use custom KotlinX serialization formats to serialize in and out of databases, so I'm probably not your target market realistically
j
@joseph_ivie Measured JAR sizes: Ghost runtime (
ghost-api
+
ghost-serialization
) comes in at ~336 KB on JVM — that's what actually ships.
ghost-compiler
is build-time only (KSP processor), doesn't end up in the final binary. For comparison, kotlinx-serialization (core + json) is ~653 KB.
thank you color 1