-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to write a wrapper for an existing JS library? #1265
Comments
👍 |
Please don't hesitate! It's true that for the MVP we focused on using Rust within JS projects, but there are absolutely plans to support using JS in Rust: |
👍 |
You didn't mention whether you want If you want to avoid nodejs, then I am sorry because I don't have a ready-to-use-build-steps list now! If you want to find the solution yourself, you can go through source code of one of two tools:
From what I can recall, these are what involve:
|
I forgot a problem about file name's extension.
From what I understand, bundlers like webpack think it refer to the So, there is no easy build-steps to make it works without webpack. (Unless you know how to search and replace text from the terminal). |
Thanks for the report, and this is definitely something we want to support! The RFC's linked by @Pauan have all our future plans, so I'm gonna close this in favor of those. |
I'd like to create a wrapper for an existing JS lib (in my case it's leaflet) but I couldn't find any documentation about how to do this.
Do I have to create e.g. a
leaflet_wrapper.js
(like the example @ rustwasm #importing-non-browser-js) and then create the actualleaflet.rs
that is linked to the wrapper?The text was updated successfully, but these errors were encountered: