rust ->Tauri +yew
that’s the problem. invoke works fine in the desktop application, but in the browser I get an undefine invoke error.
This expression window__TAURI__ has no problem, but window__TAURI__invoke will encounter an error
Even the default tauri installation has this error
desktop app is working
app in browser get error
use trunk 0.20.0
rust 1.78.0
[build-dependencies]
tauri-build = { version = "1", features = [] }
[dependencies]
tauri = { version = "1", features = [ "api-all"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
[features]
custom-protocol = ["tauri/custom-protocol"]
and.......
[dependencies]
yew = { version = "0.21", features = ["csr"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = "0.3"
js-sys = "0.3"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.6"
console_error_panic_hook = "0.1.7"
[workspace]
members = ["src-tauri"]
I did the default tauri install
cargo install create-tauri-app –locked
cargo create-tauri-app
But I faced the problem I said
Majid Shabani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.