type t =
| Zero [@key 0]
| One [@key 1]
[@@deriving protobuf]
will produce an error Key 0 is outside of valid range [1:0x1fffffff].
But zero values in protobuf enums are perfectly fine. Probably @key should be aware of context where it is being used.