Stream: git-wasmtime

Topic: wasmtime / issue #4361 Support enums with more than 256 v...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 03 2022 at 01:22):

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_

view this post on Zulip Wasmtime GitHub notifications bot (Jul 05 2022 at 15:37):

alexcrichton commented on issue #4361:

Added in https://github.com/bytecodealliance/wasmtime/pull/4370

view this post on Zulip Wasmtime GitHub notifications bot (Jul 05 2022 at 15:37):

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: Dec 23 2024 at 12:05 UTC