Replies: 2 comments 1 reply
-
First of all, thanks for trying out the component support and giving us some feedback! I think you are hitting a few things we don't support just yet but I should be able to tweak what you have slightly to work given our current limitations. Documentation on component support is also just not there yet. Specifically, we do not yet support resources or exported interfaces, only function exports work just now. I'll go ahead and add additional issues for these limitations so we can track our progress. That said, I'll have a go at reworking what you have so we can reference it as an example (presuming I get it working!). |
Beta Was this translation helpful? Give feedback.
-
Hey @danj3 I was able to take your example and get it working with a few changes. I started an examples repo and put it here: https://github.com/superchris/wasm_component_example. Love to hear your thoughts, and thanks again! |
Beta Was this translation helpful? Give feedback.
-
This may be related to #675. I believe this is within the realm @superchris and @tessi are currently working.
I am trying to call a function that is part of an interface that is exported. I'm not sure if I just have the wrong name, or what the name should be. I tried using the WIT parser (output below), and it only shows the package export.
This might be the name to resolve or just the stage of development of wasmex, or a bug. But maybe there is a simple answer (before I waste more time)?
I have a very minimal set up, trying to call a JS component function that is described by an interface. A package export works. But since I can't figure this out maybe it will help someone. I appreciate and guidance.
wasmex is looking really good and thank you for the all the work!
Here is the WIT:
here is the JS I've run through jco:
For this WIT, the parser shows only:
The wasm documentation hides or fails to clearly disclose what an exported function via an interface would look like in string form to return the index using get_func. My hope was the WIT parser would give me a clue to that name. So I've tried all kinds of string paths, none yield success from get_func. For example:
I don't know what the proper name for
writer
is.I did produce a WAT and the tail section, with exports, looks like:
Beta Was this translation helpful? Give feedback.
All reactions