c/lib.rs: dtor symbols should use name, not snake - #1341
Conversation
cpetig
left a comment
There was a problem hiding this comment.
Looks like an obvious correction to me.
(Snake case is never used in webassembly, will probably have worked for easy cases (names without minus))
|
I guess it would be possible to extend the runtime tests to cover this error (fail before, pass after) by implementing a resource in C which has a more complex name. |
|
I'm not really familiar enough with the test framework to make that change. Note that this bug case only comes up when we generate bindings using C, and try to consume the resulting component with bindings generated in some other language. |
|
I took a look at that for a few hours and couldn't figure out how to add a test that compares the output of two different generators. I'm not going to put more work into this patch, feel free to close or merge as needed. |
I noticed this discrepancy between the symbols generated by the rust and C binding generators - this change should (hopefully) make it so that rust and C/C++ implementers can build components that are compatible with eachother.