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

Go: Add `component-type` custom section

Open rylev opened this issue 2 years ago • 4 comments

Unlike the C and Rust code generators, the Go code generator does not seem to embed the wit-bindgen version in the producer custom section in the "processed-by" field. The field should be in a format like the other languages with the key "wit-bindgen-go" and the version "0.8.0"

rylev avatar Jul 14 '23 12:07 rylev

Related to this issue but in a different context, I believe go generator does not generate "// Generated by wit-bindgen 0.8.0. DO NOT EDIT!" message to the generated Go source code files.

Mossaka avatar Jul 14 '23 22:07 Mossaka

My quesiton is how can we embed wit-bindgen version to the component? C bindgen generates a object file that does so. What's the mechanism for Golang to achieve the same thing?

Mossaka avatar Jul 14 '23 22:07 Mossaka

I've opened #621 to address the generated code preamble.

We really need to add the entire component-type section not just the producer information. I'll adjust the issue to reflect that.

rylev avatar Jul 17 '23 18:07 rylev

We really need to add the entire component-type section not just the producer information. I'll adjust the issue to reflect that.

I agree!

Mossaka avatar Jul 17 '23 22:07 Mossaka