Note: this blog post is out of date. For the latest SDKs, please see: www.docs.hedera.com/hedera/sdks-and-apis/sdks
We’re still so early in this journey we call Hedera Hashgraph. We just started opening up testnets to a wider audience of developers and boy did we learn some really cool things…things that have informed how we want to build our SDKs. Frankly, we need to make sure that developers absolutely love the SDK experience. So we’re getting smart and fun about building our SDKs with the help of those very same developers.
TL;DR — The Hedera SDK is written in Rust, compiled to C, then wrapped in your favorite language.
There are few fundamental guidelines to our SDK strategy:
1. One code-base to rule them all. We’re writing the core SDK in Rust. We chose Rust because it’s safer, faster, and compiles down nicely to C. This is great because we get Rust and C SDKs right out of the box. We can then wrap the C SDK in any language. These additional language interfaces will reference the same C artifacts, making it easier to enforce consistency between different languages, especially when it comes to things like cryptography, key management, account management, Protobuf API interfacing, and network config management.
2. “More languages” is more important than “more functionality”. We’re starting with 5–6 languages that will expose the most basic functionality to support micropayments. We’ll then build out functionality until each language’s SDK reaches a minimum viable product (MVP) state. Future MVP functions include file service, claims, smart contracts, multi-sig accounts, and some initial transaction and query validation. Those languages will include Rust (duh), C (duh), Go (wrapper), Python (wrapper), and Javascript/Node.js (wrapper).
3. Using a builder-pattern makes transactions more fun. We were tempted to build a very comprehensive and object-oriented SDK, but realized that trying to be “everything to everyone” is a failing strategy. SDKs are meant to make things easier, so let’s focus on use cases first. The builder pattern is more conversational (example below).