We are happy to announce that AWS Common Runtime (CRT) v1.0.0 is generally available (GA).
The CRT is a family of open source libraries written in C. It implements building blocks that AWS SDKs and Tools share, giving you a production-ready foundation for fast HTTP, Amazon Simple Storage Service (Amazon S3) and MQTT clients in your AWS applications.
In SDKs that have adopted the CRT, you already use it indirectly. The SDK selects the CRT components it needs and makes them available through its own API. You can also use the CRT libraries directly from C, or through language bindings for C++, Java, Python, Node.js, and other languages. For the full list, see the Component availability by binding section later in this post.
In this post, we cover what the CRT provides, what GA means for you, and how to get started.
CRT components
The CRT provides a set of libraries for common networking tasks. Three of them are clients that you can use directly.
HTTP client
For applications that need efficient network communication, the AWS CRT HTTP client implements HTTP/1.1 and HTTP/2 in C. It provides connection pooling, health-based connection management, and DNS load balancing. Seven language bindings are supported: C++, Java, Kotlin, Python, Node.js, Swift, and .NET.
For instance, the AWS SDK for Java 2.x provides it as the aws-crt-client. For information, see Announcing availability of the AWS CRT HTTP Client in the AWS SDK for Java 2.x on the AWS Developer Tools Blog.
S3 client
For high-throughput transfers to and from Amazon S3, the CRT includes a dedicated S3 client. This client converts a single upload or download into many requests that run in parallel, which removes the throughput limit of a single connection. On failure, it retries individual parts rather than restarting the whole transfer.
In the AWS SDK for Java 2.x, it supports the AWS CRT-based S3 client and the S3 Transfer Manager. For information about using these features, see Introducing CRT-based S3 Client and the S3 Transfer Manager in the AWS SDK for Java 2.x on the AWS Developer Tools Blog.
MQTT client
For connected-device applications, there are MQTT clients for connecting devices to AWS IoT Core. MQTT support is available in a subset of CRT language bindings. To get started with MQTT in a supported language, see one of the following AWS IoT Device SDK user guides:
- MQTT 5 user guide for C++
- MQTT 5 user guide for Java
- MQTT 5 user guide for JavaScript
- MQTT 5 user guide for Python
- MQTT 5 user guide for Swift
Signing and checksums
Beyond its networking clients, CRT provides request signing and data-integrity checksums. Signing includes AWS Signature Version 4 (SigV4) and SigV4a for multi-Region requests. Several AWS SDKs use the CRT for signing and checksums, so you may already depend on it even if you do not use a CRT-based HTTP or S3 client.
Component availability by binding
Component support varies by language binding. The following table shows what each language binding supports today:
| Binding | HTTP client | HTTP/2 | S3 client | MQTT client | SigV4 / SigV4a | Checksums |
|---|---|---|---|---|---|---|
| C++ | yes | no | yes | yes | yes | yes |
| Java | yes | yes | yes | yes | yes | yes |
| Python | yes | yes | yes | yes | yes | yes |
| Kotlin | yes | yes | no | no | yes | yes |
| Swift | yes | yes | no | yes | yes | yes |
| .NET | yes | no | no | no | yes | yes |
| Node.js | yes | no | no | yes | yes | yes |
| PHP | no | no | no | no | yes | yes |
| Ruby | no | no | no | no | yes | yes |
Compatibility and versioning
Each CRT library follows a versioning contract. The details differ depending on whether you use the CRT through an SDK or link the C libraries directly.
Through an AWS SDK or language binding
If you access the CRT through an AWS SDK or language binding, you do not need to manage versions. The binding packages the native libraries and pins versions that work together. To adopt updates, use your package manager to upgrade to a newer SDK or binding version. The versioning details in the next section do not apply to you.
Linking the C libraries directly
If you link the C libraries directly, the contract works as follows:
- Within a minor version line, releases are backward compatible in both API and ABI.
- Any 1.0.z release is fully compatible with another. You can apply patch releases without code changes, recompilation, or relinking.
- When a release changes the binary interface, the library’s SONAME changes with it. A SONAME is the version identifier that the dynamic linker uses to select a shared library.
- The CRT’s SONAME carries the major and minor version. So 1.0.z installs
libaws-c-http.so.1.0, and 1.1.0 installslibaws-c-http.so.1.1. - The old and new libraries exist as separate files on disk. A program built against the earlier version keeps loading that version at runtime instead of linking against an incompatible one.
Compatibility is scoped to a minor version line, not to 1.x as a whole. This scoping means you get ABI improvements with each minor version, rather than waiting for an infrequent major release or receiving them without notice. The SONAME change makes each ABI break explicit and predictable.
In practice, you can pin to a minor version line and apply its patch releases freely. To move to a new minor version, such as 1.1, rebuild and relink your application against it.
Getting started
Setup resources
For instructions on using and building each language bindings, see the README on GitHub. The Component availability by binding table earlier in this post links to each binding’s release or package page.
For direct C usage, see the AWS Common Runtime documentation.
Upgrading from 0.x
If you use the CRT through an AWS SDK or language binding, upgrade to the latest version of your SDK or binding. You do not need to make any other changes.
If you link the C libraries directly, relink your application against 1.0.0. You do not need to change code because the API and ABI are unchanged from the latest 0.x release. Only the SONAMEs changed, to follow the new major.minor scheme.
Conclusion
The AWS Common Runtime v1.0.0 is now GA. It gives you high-performing implementations of HTTP, Amazon S3 transfer, MQTT, request signing, and checksums. These are available in C and across nine language bindings. Every library now follows a versioning contract that tells you when an upgrade is safe and when you must rebuild.
To get started:
- Upgrade to the latest version of your AWS SDK or CRT binding, or relink your C application against 1.0.0.
- For large Amazon S3 transfers, try the CRT-based S3 client.
- For new IoT applications, use the MQTT 5 client.
- To suggest improvements or request features, open an issue in the relevant library’s GitHub repository listed in the Component availability by binding table.
We welcome your feedback. If you have questions about this post, leave a comment in a relevant library’s GitHub repository.
![Physical AI Hardware Software Co Design — Ch.02: Compute Platforms for Physical AI [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7wrr8jeuwbcytjsfttp0.png)