bytecodealliance / bytecodealliance/wasmtime-py

Better type support with components

Open
#312 0 comments 1 reaction 0 assignees View on GitHub
component-model wasmtime c-api
Dominant language
Python
Stars
539
Forks
69
Avg merge
13m
Merged PRs (30d)
1

Description

Currently the way records and variants are supported with components is a bit kludge. All records are a `Record` and some variants are a `Variant` but others are "a union of a bunch of types". There's no way to get more static information which is unfortunate.

Ideally what would happen is that when a component was loaded and compiled it would load up and define Python classes for variants/records within the component. These python classes would then be used during conversion to/from C and could be used with `isinstance` and such. In theory it would also be nice to customize the classes used for use cases like ahead-of-time generated bindings.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.