Published on

Update on smaws development - September 2025

Authors
  • avatar
    Name
    Chris Armstrong
    Twitter

It's been a while since I last posted about smaws. I'm currently doing some work to get it ready for a for the ICFP Ocaml workshop in Singapore, where I'm presenting on smaws.

smaws is an implementation of the AWS SDKs, but it is also an independent client implementation of the Smithy specification for specifying client SDKs.

Smithy itself is different from pure-API specifications like OpenAPI or JSON-type specifications like json-schema in that it focuses on protocols and generating SDKs, ensuring that the APIs for a client or server are wrapped in a coherent and straightforward manner for use in any target language. smaws provides an alternative to the existing Java-based Smithy generator tooling, specifically for targeting OCaml.

One of my key goals before the conferences is to implement compliance testing for the supported protocols. AWS supply Smithy-based compliance tests in JSON format, which can be transformed into unit tests to validate an implementation of specific protocol extensions.

smaws only supports the AwsJson1_0 and AwsJson1_1 protocols, so my focus has been to get the compliance tests for these working before implementing the remaining protocols.

The process of getting these working has been quite involved, but its sured up the implementation and provided a lot of confidence its correctly implemented.

There's also been two major improvements to the SDK itself:

  • Cross-namespace support: although this isn't typically used in the AWS service specifications, it is now possible to generate separate modules for each namespace and enable them to use each other's types and serialisers
  • HTTP implementation substitutability: the HTTP interfaces have been refactored to support mocking them for the tests, but a side-effect of this is we may now be able to supply alternate HTTP implementations for other effects-based schedulers (as the interface itself does not depend on any eio-specific types or APIs). Even better, these don't rely on functors, so I'd love to be able to plug in a miou or LWT 6.0 based HTTP library.