fabricedesre / wit-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wit-bindgen handles

This project goal is to build a system where the JS side can provide the implementation for some resource, and have it usable on the Rust side.

delegate.wit describes the JS-implemented resource. It is the used in service.wit.

To run the demo, run a http server in this directory, eg. with python http.server and access http://localhost:8000/demo/index.html. Then click on the Run Test button and look at the messages.

The add-delegate() function expects a delegate parameter, but there doesn't seem to be a way to create such an instance and "import" it into the WASM memory so that why the check for (!(obj1 instanceof Delegate)) pass.

Or am I missing something?

About


Languages

Language:Rust 61.9%Language:Shell 38.1%