Home / Companies / Google Cloud / Blog / Post Details
Content Deep Dive

Announcing Kotlin support for protocol buffers

Blog post from Google Cloud

Post Details
Company
Date Published
Author
-
Word Count
856
Language
English
Hacker News Points
-
Summary

Google has announced official support for Kotlin in the Protocol Buffers project, enhancing its commitment to the Kotlin language, which is already favored for Android development and backend services at Google. This new support allows for the generation of idiomatic Kotlin Domain Specific Languages (DSLs) from protocol buffer definitions, enabling more concise and expressive code with Kotlin's type-safe builders. The integration with gRPC Kotlin offers a streamlined syntax for writing high-performance RPC code, reducing boilerplate and improving readability. Protos can now be used in both the standard and "proto lite" modes, with the latter being more suitable for Android due to its smaller, higher-performance classes. This development also requires some configuration in build tools like Maven and Gradle to generate Kotlin code. The announcement encourages developers to explore Kotlin protos through various examples and resources, including those deployable on Google Cloud Run, and invites feedback on issues through the official protobuf project.