Skip to content

Reimplement bindgen for components #309

Open

Description

@alexcrichton

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 #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.

Activity

  1. added
    component-model
    on Nov 5, 2025
  2. hwms commented on Dec 4, 2025

    @hwms

    https://github.com/bytecodealliance/componentize-py
    python3 -m wasmtime.bindgen app.wasm --out-dir hello_host
    No module named wasmtime.bindgen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component-model

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions