[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5770":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},5770,"wry","tauri-apps\u002Fwry","tauri-apps","Cross-platform WebView library in Rust for Tauri.","",null,"Rust",4827,471,32,123,0,1,16,57,10,30.02,"Apache License 2.0",false,"dev",true,[],"2026-06-12 02:01:14","\u003Cp align=\"center\">\u003Cimg height=\"100\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Ftauri-apps\u002Fwry\u002Frefs\u002Fheads\u002Fdev\u002F.github\u002Fsplash.png\" alt=\"WRY Webview Rendering library\" \u002F>\u003C\u002Fp>\n\n[![](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fwry?style=flat-square)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fwry) [![](https:\u002F\u002Fimg.shields.io\u002Fdocsrs\u002Fwry?style=flat-square)](https:\u002F\u002Fdocs.rs\u002Fwry\u002F)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT%20or%20Apache%202-green.svg)](https:\u002F\u002Fopencollective.com\u002Ftauri)\n[![Chat Server](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fchat-discord-7289da.svg)](https:\u002F\u002Fdiscord.gg\u002FSpmNs4S)\n[![website](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fwebsite-tauri.app-purple.svg)](https:\u002F\u002Ftauri.app)\n[![https:\u002F\u002Fgood-labs.github.io\u002Fgreater-good-affirmation\u002Fassets\u002Fimages\u002Fbadge.svg](https:\u002F\u002Fgood-labs.github.io\u002Fgreater-good-affirmation\u002Fassets\u002Fimages\u002Fbadge.svg)](https:\u002F\u002Fgood-labs.github.io\u002Fgreater-good-affirmation)\n[![support](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fsponsor-Open%20Collective-blue.svg)](https:\u002F\u002Fopencollective.com\u002Ftauri)\n\nWry is a cross-platform WebView rendering library.\n\nThe webview requires a running event loop and a window type that implements [`HasWindowHandle`],\nor a gtk container widget if you need to support X11 and Wayland.\nYou can use a windowing library like [`tao`] or [`winit`].\n\n### Examples\n\nThis example leverages the [`HasWindowHandle`] and supports Windows, macOS, iOS, Android and Linux (X11 Only).\nSee the following example using [`winit`]:\n\n```rust\n#[derive(Default)]\nstruct App {\n  window: Option\u003CWindow>,\n  webview: Option\u003Cwry::WebView>,\n}\n\nimpl ApplicationHandler for App {\n  fn resumed(&mut self, event_loop: &ActiveEventLoop) {\n    let window = event_loop.create_window(Window::default_attributes()).unwrap();\n    let webview = WebViewBuilder::new()\n      .with_url(\"https:\u002F\u002Ftauri.app\")\n      .build(&window)\n      .unwrap();\n\n    self.window = Some(window);\n    self.webview = Some(webview);\n  }\n\n  fn window_event(&mut self, _event_loop: &ActiveEventLoop, _window_id: WindowId, event: WindowEvent) {}\n}\n\nlet event_loop = EventLoop::new().unwrap();\nlet mut app = App::default();\nevent_loop.run_app(&mut app).unwrap();\n```\n\nIf you also want to support Wayland too, then we recommend you use [`WebViewBuilderExtUnix::new_gtk`] on Linux.\nSee the following example using [`tao`]:\n\n```rust\nlet event_loop = EventLoop::new();\nlet window = WindowBuilder::new().build(&event_loop).unwrap();\n\nlet builder = WebViewBuilder::new().with_url(\"https:\u002F\u002Ftauri.app\");\n\n#[cfg(not(target_os = \"linux\"))]\nlet webview = builder.build(&window).unwrap();\n#[cfg(target_os = \"linux\")]\nlet webview = builder.build_gtk(window.gtk_window()).unwrap();\n```\n\n### Child webviews\n\nYou can use [`WebViewBuilder::build_as_child`] to create the webview as a child inside another window. This is supported on\nmacOS, Windows and Linux (X11 Only).\n\n```rust\n#[derive(Default)]\nstruct App {\n  window: Option\u003CWindow>,\n  webview: Option\u003Cwry::WebView>,\n}\n\nimpl ApplicationHandler for App {\n  fn resumed(&mut self, event_loop: &ActiveEventLoop) {\n    let window = event_loop.create_window(Window::default_attributes()).unwrap();\n    let webview = WebViewBuilder::new()\n      .with_url(\"https:\u002F\u002Ftauri.app\")\n      .with_bounds(Rect {\n        position: LogicalPosition::new(100, 100).into(),\n        size: LogicalSize::new(200, 200).into(),\n      })\n      .build_as_child(&window)\n      .unwrap();\n\n    self.window = Some(window);\n    self.webview = Some(webview);\n  }\n\n  fn window_event(&mut self, _event_loop: &ActiveEventLoop, _window_id: WindowId, event: WindowEvent) {}\n}\n\nlet event_loop = EventLoop::new().unwrap();\nlet mut app = App::default();\nevent_loop.run_app(&mut app).unwrap();\n```\n\nIf you want to support X11 and Wayland at the same time, we recommend using\n[`WebViewExtUnix::new_gtk`] or [`WebViewBuilderExtUnix::new_gtk`] with [`gtk::Fixed`].\n\n```rust\nlet event_loop = EventLoop::new();\nlet window = WindowBuilder::new().build(&event_loop).unwrap();\n\nlet builder = WebViewBuilder::new()\n  .with_url(\"https:\u002F\u002Ftauri.app\")\n  .with_bounds(Rect {\n    position: LogicalPosition::new(100, 100).into(),\n    size: LogicalSize::new(200, 200).into(),\n  });\n\n#[cfg(not(target_os = \"linux\"))]\nlet webview = builder.build_as_child(&window).unwrap();\n#[cfg(target_os = \"linux\")]\nlet webview = {\n  # use gtk::prelude::*;\n  let vbox = window.default_vbox().unwrap(); \u002F\u002F tao adds a gtk::Box by default\n  let fixed = gtk::Fixed::new();\n  fixed.show_all();\n  vbox.pack_start(&fixed, true, true, 0);\n  builder.build_gtk(&fixed).unwrap()\n};\n```\n\n### Platform Considerations\n\nHere is the underlying web engine each platform uses, and some dependencies you might need to install.\n\n#### Linux\n\n[WebKitGTK](https:\u002F\u002Fwebkitgtk.org\u002F) is used to provide webviews on Linux which requires GTK,\nso if the windowing library doesn't support GTK (as in [`winit`])\nyou'll need to call [`gtk::init`] before creating the webview and then call [`gtk::main_iteration_do`] alongside\nyour windowing library event loop.\n\n```rust\n#[derive(Default)]\nstruct App {\n  webview_window: Option\u003C(Window, WebView)>,\n}\n\nimpl ApplicationHandler for App {\n  fn resumed(&mut self, event_loop: &ActiveEventLoop) {\n    let window = event_loop.create_window(Window::default_attributes()).unwrap();\n    let webview = WebViewBuilder::new()\n      .with_url(\"https:\u002F\u002Ftauri.app\")\n      .build(&window)\n      .unwrap();\n\n    self.webview_window = Some((window, webview));\n  }\n\n  fn window_event(&mut self, _event_loop: &ActiveEventLoop, _window_id: WindowId, event: WindowEvent) {}\n\n  \u002F\u002F Advance GTK event loop \u003C!----- IMPORTANT\n  fn about_to_wait(&mut self, _event_loop: &ActiveEventLoop) {\n    #[cfg(target_os = \"linux\")]\n    while gtk::events_pending() {\n      gtk::main_iteration_do(false);\n    }\n  }\n}\n\nlet event_loop = EventLoop::new().unwrap();\nlet mut app = App::default();\nevent_loop.run_app(&mut app).unwrap();\n```\n\n##### Linux Dependencies\n\n###### Arch Linux \u002F Manjaro:\n\n```bash\nsudo pacman -S webkit2gtk-4.1\n```\n\n###### Debian \u002F Ubuntu:\n\n```bash\nsudo apt install libwebkit2gtk-4.1-dev\n```\n\n###### Fedora\n\n```bash\nsudo dnf install gtk3-devel webkit2gtk4.1-devel\n```\n\n###### Nix & NixOS\n\n```nix\n# shell.nix\n\nlet\n   # Unstable Channel | Rolling Release\n   pkgs = import (fetchTarball(\"channel:nixpkgs-unstable\")) { };\n   packages = with pkgs; [\n     pkg-config\n     webkitgtk_4_1\n   ];\n in\n pkgs.mkShell {\n   buildInputs = packages;\n }\n```\n\n```sh\nnix-shell shell.nix\n```\n\n###### GUIX\n\n```scheme\n;; manifest.scm\n\n(specifications->manifest\n  '(\"pkg-config\"                ; Helper tool used when compiling\n    \"webkitgtk\"                 ; Web content engine fot GTK+\n ))\n```\n\n```bash\nguix shell -m manifest.scm\n```\n\n#### macOS\n\nWebKit is native on macOS so everything should be fine.\n\nIf you are cross-compiling for macOS using [osxcross](https:\u002F\u002Fgithub.com\u002Ftpoechtrager\u002Fosxcross) and encounter a runtime panic like `Class with name WKWebViewConfiguration could not be found` it's possible that `WebKit.framework` has not been linked correctly, to fix this set the `RUSTFLAGS` environment variable:\n\n```bash\nRUSTFLAGS=\"-l framework=WebKit\" cargo build --target=x86_64-apple-darwin --release\n```\n\n#### Windows\n\nWebView2 provided by Microsoft Edge Chromium is used. So wry supports Windows 7, 8, 10 and 11.\n\n#### Android\n\nIn order for `wry` to be able to create webviews on Android, there are a few requirements that your application needs to uphold:\n\n1. You need to set a few environment variables that will be used to generate the necessary kotlin\n   files that you need to include in your Android application for wry to function properly.\n   - `WRY_ANDROID_PACKAGE`: which is the reversed domain name of your android project and the app name in snake_case, for example, `com.wry.example.wry_app`\n   - `WRY_ANDROID_LIBRARY`: for example, if your cargo project has a lib name `wry_app`, it will generate `libwry_app.so` so you set this env var to `wry_app`\n   - `WRY_ANDROID_KOTLIN_FILES_OUT_DIR`: for example, `path\u002Fto\u002Fapp\u002Fsrc\u002Fmain\u002Fkotlin\u002Fcom\u002Fwry\u002Fexample`\n2. Your main Android Activity needs to inherit `AppCompatActivity`, preferably it should use the generated `WryActivity` or inherit it.\n3. Your Rust app needs to call `wry::android_setup` function to setup the necessary logic to be able to create webviews later on.\n4. Your Rust app needs to call `wry::android_binding!` macro to setup the JNI functions that will be called by `WryActivity` and various other places.\n\nIt is recommended to use the [`tao`](https:\u002F\u002Fdocs.rs\u002Ftao\u002Flatest\u002Ftao\u002F) crate as it provides maximum compatibility with `wry`.\n\n```rust\n#[cfg(target_os = \"android\")]\n{\n  tao::android_binding!(\n      com_example,\n      wry_app,\n      WryActivity,\n      wry::android_setup, \u002F\u002F pass the wry::android_setup function to tao which will be invoked when the event loop is created\n      _start_app\n  );\n  wry::android_binding!(com_example, ttt);\n}\n```\n\nIf this feels overwhelming, you can just use the preconfigured template from [`cargo-mobile2`](https:\u002F\u002Fgithub.com\u002Ftauri-apps\u002Fcargo-mobile2).\n\nFor more information, check out [MOBILE.md](https:\u002F\u002Fgithub.com\u002Ftauri-apps\u002Fwry\u002Fblob\u002Fdev\u002FMOBILE.md).\n\n### Feature flags\n\nWry uses a set of feature flags to toggle several advanced features.\n\n- `os-webview` (default): Enables the default WebView framework on the platform. This must be enabled\n  for the crate to work. This feature was added in preparation of other ports like cef and servo.\n- `protocol` (default): Enables [`WebViewBuilder::with_custom_protocol`] to define custom URL scheme for handling tasks like\n  loading assets.\n- `drag-drop` (default): Enables [`WebViewBuilder::with_drag_drop_handler`] to control the behavior when there are files\n  interacting with the window.\n- `devtools`: Enables devtools on release builds. Devtools are always enabled in debug builds.\n  On **macOS**, enabling devtools, requires calling private APIs so you should not enable this flag in release\n  build if your app needs to publish to App Store.\n- `transparent`: Transparent background on **macOS** requires calling private functions.\n  Avoid this in release build if your app needs to publish to App Store.\n- `fullscreen`: Fullscreen video and other media on **macOS** requires calling private functions.\n  Avoid this in release build if your app needs to publish to App Store.\n- `linux-body`: Enables body support of custom protocol request on Linux. Requires\n  WebKit2GTK v2.40 or above.\n- `tracing`: enables [`tracing`] for `evaluate_script`, `ipc_handler`, and `custom_protocols`.\n\n### Partners\n\n\u003Ctable>\n  \u003Ctbody>\n    \u003Ctr>\n      \u003Ctd align=\"center\" valign=\"middle\">\n        \u003Ca href=\"https:\u002F\u002Fcrabnebula.dev\" target=\"_blank\">\n          \u003Cimg src=\".github\u002Fsponsors\u002Fcrabnebula.svg\" alt=\"CrabNebula\" width=\"283\">\n        \u003C\u002Fa>\n      \u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\nFor the complete list of sponsors please visit our [website](https:\u002F\u002Ftauri.app#sponsors) and [Open Collective](https:\u002F\u002Fopencollective.com\u002Ftauri).\n\n### License\n\nApache-2.0\u002FMIT\n\n[`tao`]: https:\u002F\u002Fdocs.rs\u002Ftao\n[`winit`]: https:\u002F\u002Fdocs.rs\u002Fwinit\n[`tracing`]: https:\u002F\u002Fdocs.rs\u002Ftracing\n","Wry 是一个用 Rust 编写的跨平台 WebView 渲染库。它支持在 Windows、macOS、iOS、Android 和 Linux（X11 和 Wayland）上运行，并且需要一个活动的事件循环和实现 `HasWindowHandle` 接口的窗口类型，或者 GTK 容器小部件以支持 X11 和 Wayland。Wry 通过与 `tao` 或 `winit` 等窗口库集成，可以轻松地在应用程序中嵌入网页内容。此外，它还提供了创建子 WebView 的功能，适用于希望在桌面应用中嵌入 Web 内容的各种场景，如构建混合式应用或集成在线服务。",2,"2026-06-11 03:05:00","top_language"]