Skip to content

Using JavaScript functions from Rust #3860

Answered by daxpedda
Necro-U asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure I understand the question right, but wasm-bindgen is designed to be used with Rust compiled to wasm32-unknown-unknown and run in a JavaScript environment. It is not designed to somehow run JavaScript from a native (e.g. x86) environment.

If you are running in a JavaScript environment (e.g. browser, NodeJS), you can link to JS functions and run that. See the wasm-bindgen book for more details.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Necro-U
Comment options

Answer selected by Necro-U
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants