Skip to content

feat(kotlin): add schema idl support to kotlin#3684

Merged
chaokunyang merged 12 commits into
apache:mainfrom
chaokunyang:add_schema_idl_support_to_kotlin
May 16, 2026
Merged

feat(kotlin): add schema idl support to kotlin#3684
chaokunyang merged 12 commits into
apache:mainfrom
chaokunyang:add_schema_idl_support_to_kotlin

Conversation

@chaokunyang
Copy link
Copy Markdown
Collaborator

@chaokunyang chaokunyang commented May 15, 2026

Why?

Kotlin did not have Schema IDL compiler output or matching generated xlang registration support, so Kotlin users could not generate Fory IDL models alongside the other supported languages.

What does this PR do?

  • Adds Kotlin as a Schema IDL compiler target, including --kotlin_out, kotlin_package, generator registration, and generated Kotlin model/registration output.
  • Implements Kotlin IDL generation for structs, enums, unions, nested types, package handling, type IDs, unsigned types, half/bfloat16 arrays, duration fields, references, and cycle-owned classes.
  • Extends Kotlin KSP/runtime support for generated xlang serializers, union serializers, runtime type aliases, generated serializer lookup, and Kotlin Duration xlang encoding.
  • Adds Kotlin IDL unit and integration coverage, including a Kotlin peer module and Java round-trip hooks for the IDL test suite.
  • Updates compiler, Kotlin, generated-code, schema IDL, and xlang type-mapping documentation for Kotlin support.

Related issues

#1017
#3679

AI Contribution Checklist

  • Substantial AI assistance was used in this PR: yes / no
  • If yes, I included a completed AI Contribution Checklist in this PR description and the required AI Usage Disclosure.
  • If yes, my PR description includes the required ai_review summary and screenshot evidence of the final clean AI review results from both fresh reviewers on the current PR diff or current HEAD after the latest code changes.

Does this PR introduce any user-facing change?

Yes. It adds Kotlin Schema IDL compiler output and related Kotlin generated-serializer registration APIs. It does not change the existing binary protocol format.

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

N/A. This PR adds Kotlin Schema IDL generation and coverage, not a benchmarked runtime optimization.

@chaokunyang chaokunyang merged commit 1fa8735 into apache:main May 16, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants