kuri-bind's runtime binder is JVM-only: it discovers annotated members through Kotlin reflection
(kotlin-reflect), which exists only on the JVM. The annotations, BindOptions, KuriBindException,
and the internal UrlBinder/UriBinder seam already live in commonMain, so their coordinates are
stable and code on any target can declare bindings today — only the runtime engine is JVM-bound.
A compile-time backend would close the gap: a KSP processor reads the same commonMain annotations and
generates a per-type binder — the same "binding plan" the reflective backend computes at runtime —
registered behind the existing binder seam. JS/Wasm/Native would then get the identical KuriBind
public surface with no reflection and no user-facing change.
Scope:
- KSP processor emitting a binder per
@Url/@Uri root, mirroring PlanCompiler/ReflectiveBinder
(leaves, scalar-scoped recursion, @Url/@Uri merge, @PathTemplate hole resolution).
- Wire generated binders into the seam resolver; move the
KuriBind entry points from jvmMain to
commonMain (ABI-compatible for JVM consumers — generated class names are unchanged).
- Declare the additional Kotlin Multiplatform targets on the
kuri-bind module.
Additive; current JVM behavior is unchanged.
kuri-bind's runtime binder is JVM-only: it discovers annotated members through Kotlin reflection(
kotlin-reflect), which exists only on the JVM. The annotations,BindOptions,KuriBindException,and the internal
UrlBinder/UriBinderseam already live incommonMain, so their coordinates arestable and code on any target can declare bindings today — only the runtime engine is JVM-bound.
A compile-time backend would close the gap: a KSP processor reads the same
commonMainannotations andgenerates a per-type binder — the same "binding plan" the reflective backend computes at runtime —
registered behind the existing binder seam. JS/Wasm/Native would then get the identical
KuriBindpublic surface with no reflection and no user-facing change.
Scope:
@Url/@Uriroot, mirroringPlanCompiler/ReflectiveBinder(leaves, scalar-scoped recursion,
@Url/@Urimerge,@PathTemplatehole resolution).KuriBindentry points fromjvmMaintocommonMain(ABI-compatible for JVM consumers — generated class names are unchanged).kuri-bindmodule.Additive; current JVM behavior is unchanged.