This also requires some traits and structs in an `encode` module (the one in piet-metal/piet-gpu-types works, and was used to test).