Closed guybedford closed 5 months ago
All the classes in preview2-shims use an #id that is internally constructed. This therefore only applies to user-created objects and not bindgen-created objects.
#id
In order to properly support bindgen resource creation we need to replace all use of #id with Symbol.cabiRep per the resource bindgen convention in https://github.com/bytecodealliance/jco/blob/main/docs/src/optimized-host-bindings.md#resourceinstancesymbolforcabirep.
Symbol.cabiRep
Pollable, excluding the cabiLower part is a good example of how to do this.
cabiLower
This work also lays the foundations for low-level bindgen for all WASI interfaces as well.
All the classes in preview2-shims use an
#id
that is internally constructed. This therefore only applies to user-created objects and not bindgen-created objects.In order to properly support bindgen resource creation we need to replace all use of
#id
withSymbol.cabiRep
per the resource bindgen convention in https://github.com/bytecodealliance/jco/blob/main/docs/src/optimized-host-bindings.md#resourceinstancesymbolforcabirep.Pollable, excluding the
cabiLower
part is a good example of how to do this.This work also lays the foundations for low-level bindgen for all WASI interfaces as well.