wit-bindgen icon indicating copy to clipboard operation
wit-bindgen copied to clipboard

go: make generated code more idiomatic

Open dicej opened this issue 3 months ago • 0 comments

wit-bindgen-go was written by a Go novice (me) and could use some feedback from experienced Go developers regarding API idioms. Here are some examples of potential improvements:

  • Make functions which return result<T, E> in WIT return e.g. (T, *E) in Go and ensure that *E implements the standard Go Error interface
  • Implement io.Writer for StreamWriter[u8] and io.Reader for StreamReader[u8]

I'm sure others will have more ideas.

dicej avatar Dec 08 '25 17:12 dicej