Deploying Protobuf APIs across platforms can be challenging since many clients are unfamiliar with protoc
, its plugins, and the configuration they require. Backend engineers often have to spend valuable time explaining to clients across the company how they should generate their client stubs to invoke the underlying APIs. At the end of the day, both backend teams and their clients end up frustrated.
Imagine a world where backend engineers didn’t have to explain anything to clients about protoc
, and were simply able to say, “Here’s the SDK for my APIs - just plug it into your native package manager.” They’d be relieved to have their time back, and clients would be thrilled to avoid having to learn the protoc
toolchain.
With the Buf Schema Registry’s generated SDKs—automatically generated native libraries for Go, Java, JS, TS, Swift, Kotlin, and Python—that are continuously produced for every version of your API and every Protobuf plugin you have, this can be a reality. No client engineers will ever need to understand how to generate code from Protobuf schemas again:
To start using generated SDKs in your project, you’ll first need to sign in to the BSR and navigate to one of your Protobuf modules. (If you haven’t pushed any schemas to the BSR yet, you can learn how to create your first module in our documentation.)
Once you’ve selected a module, click on the SDKs tab. If this is your first time using generated SDKs, you’ll be greeted with a walkthrough and prompted to select your preferred language:
Once you’ve selected a language, you’ll be presented with a list of relevant Protobuf plugins/runtimes to choose from. Typically, you’ll want to select a plugin for the base model types (such as bufbuild/es
for TypeScript types) and a plugin for RPC generation (such as connectrpc/es
):
After clicking Continue, the BSR will provide instructions on how to configure your environment to integrate generated SDKs (such as configuring npm
locally). Below these instructions, you’ll find the list of SDKs that have been generated for this particular module and the plugins you selected in the previous step. Installing the SDKs varies by language, but it is typically a 1-line command or configuration entry.
Each SDK includes a View integration guide button which will take you to documentation and examples for how the generated code contained by the SDK should be consumed by your application/service code. If you wish to use a plugin version other than the latest, you can change the Plugin version dropdown to a specific version. You can also switch the branch/tag/commit for SDKs by changing the Current reference dropdown on the top left of the page.
If you come back to this page later, you will not be prompted to choose a language or plugins again, but you can update these at any time by clicking Change language above the list of SDKs.
You can get started with generated SDKs by signing up for the BSR for free and pushing your first Protobuf schema. Our documentation for generated SDKs also contains language-specific walkthroughs for each supported package manager.
If you have any questions about generated SDKs or configuring the BSR, please reach out to us in the Buf Slack!