Unions are uniquely challenging to implement in bindings because their cases do not have kebab-case names. See for example the wit-bindgen Rust generator's awkward solution to this: https://github.com/bytecodealliance/wasmtime/blob/367bdc8c66df62d6854966a90564b42692a3f023/crates/wit-bindgen/src/rust.rs#L317
Rather than expecting each bindings language to come up with a generic naming scheme to handle unions, I think we should put the onus on WIT authors to select reasonable case names on an equivalent variant.
A quick Github search (and review of WASI) suggests that unions are not currently in use outside of tests and samples.
Unions are uniquely challenging to implement in bindings because their cases do not have kebab-case names. See for example the wit-bindgen Rust generator's awkward solution to this: https://github.com/bytecodealliance/wasmtime/blob/367bdc8c66df62d6854966a90564b42692a3f023/crates/wit-bindgen/src/rust.rs#L317
Rather than expecting each bindings language to come up with a generic naming scheme to handle
unions, I think we should put the onus on WIT authors to select reasonable case names on an equivalentvariant.A quick Github search (and review of WASI) suggests that
unions are not currently in use outside of tests and samples.