Skip to content

Support generating just types & bindings #102

@sd2k

Description

@sd2k

Currently Gravity takes a Wasm file containing embedded WIT as input, and uses:

  • the WIT to generate types & bindings for imports and exports
  • the Wasm (embedded or inlined) to generate code to create a runtime & instantiated module to use those types and bindings

I have a different use case, where I want to just generate the bindings, and have the user provide their own Wasm bytes for compilation & instantiation later. I think this should be fairly easy; we could even still generate a factory that accepts arbitrary bytes rather than embedding them directly.

This would allow creation of reusable Go packages which represent a WIT interface without being tied to a specific implementation (the Wasm itself).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions