Your API specification and implementation need to match. A mismatch is a recipe for heartbreak--broken clients, busted docs--and we see it all the time. Ideally we want a single source of truth for all aspects of an API, but too often we’re forced to specify attributes in multiple places which opens the door for “alternative mistruths”. For our rapidly evolving API, we developed a new library in Rust that incorporates OpenAPI, not just as decorations, but as load-bearing mechanisms that fully define the interface, both specification and implementation.
In this session, we’ll discuss methods of keeping specification and implementation in sync; why we developed Dropshot as an OpenAPI-first HTTP API library; and how we used some of the differentiated capabilities of the Rust language to combine code and contract. We will cover some of the properties of Rust that may be unfamiliar to the audience such as derive- and proc-macros and the powerful Rust type system.
Adam is the co-creator of DTrace, ZFS, Delphix, and Transposit. He was the 2019 API World Innovator of the Year. He's currently an engineer at Oxide, building hyperscale computing for sub-hyperscale companies.