question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to access webview from multiple Rust function

See original GitHub issue

Can I define webview as global variable, or is there a way to access it from another Rust function.

I tried to define it as below but it is not working:

static mut webview: WebViewBuilder = web_view::builder();

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
zxeycommented, Apr 24, 2020

You should only pass web_view::Handle to threads, docs for it here.

0reactions
hyousefGophercommented, Apr 25, 2020

mmm, thanks for the feedback, but not sure how to define any of the options 😦

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

wry::webview - Rust - Docs.rs
A parsed URL record. WebContext. A context that is shared between multiple WebView s. WebView. The fundamental type to present a WebView ....
Read more >
rust - Is there a way to avoid cloning when passing a WebView ...
I'm making a mini web browser with gtk. This code works fine, but I want to avoid all the cloning that is using....
Read more >
Embedding a Web View - Rust Users Forum
FYI most GUI frameworks typically use thread local storage, so passing the *mut webview across threads (i.e. when you implement Send ) may...
Read more >
Tauri tray experiment - Webview to Rust function - YouTube
Tauri is a framework for building tiny, fast binaries for all major desktop platforms. Developers can integrate any front-end framework that ...
Read more >
Tauri tray experiment - Rust Emitting To Webview - YouTube
With Tauri, we implement a function in Rust to emit an event with data to the webview.Tauri is a framework for building tiny,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found