Automatically generate wasm_bindgen library from Javascrip Library

I have never really worked with Javascript before, but now I want to set up a web service and since Web Assembly is coming up right now, I am hoping I can just compile Rust to WASM and build web pages and applications in Rust with a minimal javascript harness. However there are very few web libraries ported to Rust, and I will need to call into javascript libraries from Rust code.

Is there a way to automatically generate a Rust interface for a given javascript module?
As I said I am not too familiar with Javascript, but I guess in order to bind to a JS library we just need a FFI to all of the functions and data types exported by the JS library. The resulting Rust module could then be used in Rust code which is compiled to WASM, and is served together with the JS library.
Are there tools to do this automatically?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.