binaryen.ml
binaryen.ml copied to clipboard
feat: Add bindings for exception handling (try/catch/throw/rethrow)
Closes #189 .
One note about this API: the Binaryen constructor for try accepts either a list of catch expressions or a delegate tag. Keeping in line with the other bindings, we expose this API through Binaryen.Try.make, but we additionally define Binaryen.Try_Catch.make and Binaryen.Try_Delegate.make expressions which are more safe to use (since users don't need to worry about passing None to Try.make)
@ospencer Good call. Fixed 👍