bytecodealliance / bytecodealliance/wasmtime-py

Reimplement bindgen for components

Open
#309 1 comment 3 reactions 0 assignees View on GitHub
component-model
Dominant language
Python
Stars
539
Forks
69
Avg merge
13m
Merged PRs (30d)
1

Description

I'm about to remove the preexisting `wasmtime.bindgen` support in this module. The previous support never implemented resources, a major limitation, and had no real viable path in terms of resourcing to implementing features such as wasip3 async. The replacement for this is https://github.com/bytecodealliance/wasmtime-py/pull/308 where Wasmtime now has a C API for components which can be used instead, and that for example does support resources. The C API does not support async at this time, but that's "just" a function of the C API and will likely get filled out over time.

All that being said I think it's worth bringing back `bindgen` for components. For example where Rust embedders would use `wasmtime::component::bindgen!` I think it would make sense to have an answer in Python as well. Effectively I believe that it would make sense to generate Python sources which have type annotations and such that correspond to a component. This would enable having both typed imports and exports.

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.