Software Engineer and full-time Rustacean. While Rust is my primary language, I am also fluent in Python and Typescript. I'm also currently making a game with Godot using C#.
Apologies for the late reply but this is not a dummy question at all. I'll try to offer some info that might help you decide.
Firstly, it should be possible to do it in either. Browsers have the Fetch API available to them and you can use this within wasm: rustwasm.github.io/wasm-bindgen/ex...
From the backend you can use any HTTP client in Rust, for example reqwest.
If you do the web requests from wasm then any credentials etc will be visible via the built-in browser devtools (network tab) and depending on how much JS you have in your app it could also be vulnerable to XSS attacks.
Doing the requests from the backend in tauri should make this less visible and away from any XSS attacks. The backend would be my preference.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great tutorial. Thanks.
Dummy question: if I want to consume an external web service. Should I implement it in the frontend (Yew) or in the backend (Tauri)?
Apologies for the late reply but this is not a dummy question at all. I'll try to offer some info that might help you decide.
Firstly, it should be possible to do it in either. Browsers have the Fetch API available to them and you can use this within wasm: rustwasm.github.io/wasm-bindgen/ex...
From the backend you can use any HTTP client in Rust, for example
reqwest
.If you do the web requests from wasm then any credentials etc will be visible via the built-in browser devtools (network tab) and depending on how much JS you have in your app it could also be vulnerable to XSS attacks.
Doing the requests from the backend in tauri should make this less visible and away from any XSS attacks. The backend would be my preference.