dicej edited issue #4361:
As of https://github.com/bytecodealliance/wasmtime/pull/4359, the ComponentType/Lift/Lower derive macros can't handle enums with more than 256 variants because they assume the discriminant is a single byte. This limitation should be easy enough to remove.
This looks fantastic to me, thanks for this! I've got one question about the u8 limit, but if it's what I suspect (just more effort needed) mind filing a follow-up issue? I think it's ok to leave as-is for awhile since we're unlikely to get >256 variant-things any time in the near future.
_Originally posted by @alexcrichton in https://github.com/bytecodealliance/wasmtime/pull/4359#pullrequestreview-1025451951_
alexcrichton commented on issue #4361:
Added in https://github.com/bytecodealliance/wasmtime/pull/4370
alexcrichton closed issue #4361:
As of https://github.com/bytecodealliance/wasmtime/pull/4359, the ComponentType/Lift/Lower derive macros can't handle enums with more than 256 variants because they assume the discriminant is a single byte. This limitation should be easy enough to remove.
This looks fantastic to me, thanks for this! I've got one question about the u8 limit, but if it's what I suspect (just more effort needed) mind filing a follow-up issue? I think it's ok to leave as-is for awhile since we're unlikely to get >256 variant-things any time in the near future.
_Originally posted by @alexcrichton in https://github.com/bytecodealliance/wasmtime/pull/4359#pullrequestreview-1025451951_
Last updated: Nov 22 2024 at 17:03 UTC