Can I use rust in the front end? #14305
-
|
I have a tauri app and there's one piece of rust (a tauri command handler) that I'd like to use in the front end (so I can host the front end in a standard browser) without having to rewrite it in Javascript. Is there any way to compile the rust to WASM and load/invoke it directly in the front end? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
OK, having done some research, I am able to answer my own question: yes. In addition to the command wrapping that I would use to invoke the rust in the Tauri back-end, there is WASM/JS wrapping I can do that will allow me to load and call it directly from the front end. I found this article provides a nice introduction that is fairly up-to-date. It also has references to lots of other docs. |
Beta Was this translation helpful? Give feedback.
OK, having done some research, I am able to answer my own question: yes. In addition to the command wrapping that I would use to invoke the rust in the Tauri back-end, there is WASM/JS wrapping I can do that will allow me to load and call it directly from the front end. I found this article provides a nice introduction that is fairly up-to-date. It also has references to lots of other docs.