back to home

tauri-apps / wry

Cross-platform WebView library in Rust for Tauri.

4,707 stars
423 forks
145 issues
RustKotlinJavaScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing tauri-apps/wry in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/tauri-apps/wry)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Wry is a cross-platform WebView rendering library. The webview requires a running event loop and a window type that implements [ ], or a gtk container widget if you need to support X11 and Wayland. You can use a windowing library like [ ] or [ ]. Examples This example leverages the [ ] and supports Windows, macOS, iOS, Android and Linux (X11 Only). See the following example using [ ]: If you also want to support Wayland too, then we recommend you use [ ] on Linux. See the following example using [ ]: Child webviews You can use [ ] or [ ] to create the webview as a child inside another window. This is supported on macOS, Windows and Linux (X11 Only). If you want to support X11 and Wayland at the same time, we recommend using [ ] or [ ] with [ ]. Platform Considerations Here is the underlying web engine each platform uses, and some dependencies you might need to install. Linux WebKitGTK is used to provide webviews on Linux which requires GTK, so if the windowing library doesn't support GTK (as in [ ]) you'll need to call [ ] before creating the webview and then call [ ] alongside your windowing library event loop. Linux Dependencies Arch Linux / Manjaro: Debian / Ubuntu: Fedora Nix & NixOS GUIX macOS WebKit is native on macOS so everything should be fine. If you are cross-compiling for macOS using osxcross and encounter a runtime panic like it's possible that has not been linked correctly, to fix this set the environment variable: Windows WebView2 provided by Microsoft Edge Chromium is used. So wry supports Windows 7, 8, 10 and 11. Android In order for to be able to create webviews on Android, there are a few requirements that your application needs to uphold: • You need to set a few environment variables that will be used to generate the necessary kotlin files that you need to include in your Android application for wry to function properly. • : which is the reversed domain name of your android project and the app name in snake_case, for example, • : for example, if your cargo project has a lib name , it will generate so you set this env var to • : for example, • Your main Android Activity needs to inherit , preferably it should use the generated or inherit it. • Your Rust app needs to call function to setup the necessary logic to be able to create webviews later on. • Your Rust app needs to call macro to setup the JNI functions that will be called by and various other places. It is recommended to use the crate as it provides maximum compatibility with . If this feels overwhelming, you can just use the preconfigured template from . For more information, check out MOBILE.md. Feature flags Wry uses a set of feature flags to toggle several advanced features. • (default): Enables the default WebView framework on the platform. This must be enabled for the crate to work. This feature was added in preparation of other ports like cef and servo. • (default): Enables [ ] to define custom URL scheme for handling tasks like loading assets. • (default): Enables [ ] to control the behavior when there are files interacting with the window. • : Enables devtools on release builds. Devtools are always enabled in debug builds. On **macOS**, enabling devtools, requires calling private APIs so you should not enable this flag in release build if your app needs to publish to App Store. • : Transparent background on **macOS** requires calling private functions. Avoid this in release build if your app needs to publish to App Store. • : Fullscreen video and other media on **macOS** requires calling private functions. Avoid this in release build if your app needs to publish to App Store. • : Enables body support of custom protocol request on Linux. Requires WebKit2GTK v2.40 or above. • : enables [ ] for , , and . Partners For the complete list of sponsors please visit our website and Open Collective. License Apache-2.0/MIT [ ]: https://docs.rs/tao [ ]: https://docs.rs/winit [ ]: https://docs.rs/tracing