Behind the elegant and seemingly simple looking 'use workflow' and 'use step' directives of the new workflow development kit from @vercel lies a bunch of compiler engineering. I was curious and decided to dive deeper into the open source code. Buckle up and read this post if you are curious too. The workflow development kit(WDK) from Vercel is a new piece of developer infrastructure that let's developers write workflows and durable functions. Durable functions are stateful workflows in a serverless environment. Ordinary functions are stateless: once they finish, their context disappears. But a durable function can be paused (suspended) while waiting for an external event or timer, and later resumed from exactly where it left off with full context preserved. If you are building something that requires maintaining the state, you would typically need to store the state in a database and maintain all the baggage that comes with it. WDK aims to make this part easier.