2.2 KiB
All generators
-
handle support in exports
-
push/pull-buffer support in exports
wasmtime
-
buffer-in-buffer doesn't work. Doesn't work because we can't get a re-access of the transaction to add more buffers into it after-the-fact.
-
Needs more testing on big-endian.
-
Features from wiggle:
- use
GuestError::InFuncmore liberally- stores/loads
try_fromconversions
- generate just the trait (??? what to do about
wasmtimedep ???)
- use
JS
-
Is there a better representation for general
varianttypes? Currently it's{ tag: string, val: T }but that seems like it's probably sub-par. There's specializations foroption<T>andenumvariants, but that's it. -
Is there a better representation for flags than simply an integer?
-
Should functions returning
expected<T, E>get translated in JS to functions that returnTand throwE? -
Adding imports to an import object is clunky because you need to also pass in a closure which extracts values from the raw instance. Unsure how to make this less clunky though.
-
Needs more testing on big-endian. Specifically slice copies are probably not correct.
-
Style with names needs to be respected, currently things are using
to_snake_casebut I think JS prefers camelCase? -
The
biginttype is strict in that it does not accept plainnumbertypes to work with it. Should generated bindings be more flexible though and work withnumberin addition tobigint? -
Host-handle types are always ascribed as
anybut ideally we'd do better than that and assign them types. Maybe the type should be imported from somewhere else? -
Lifting/lowering of variants can almost surely use a more compressed technique which generates less code.
-
Enums are handled in lowering as either strings or numbers, but should only numbers be handled here? Does anyone pass around strings as enum values?
-
Exported handle types in JS aren't nominal. As of this writing they all only have a
dropand aclonemethod so they're interchangeable fromtsc's perspective. Ideally these would be nominal separate types. -
Imported handle types show up as
anyin TS, unsure how to plumb through actual types to get that actually typed.