# WRY (Webview Rendering librarY)
Cross-platfrom WebView rendering library in Rust that supports all major desktop platforms like Windows 10, macOS, and Linux.
```toml
[dependencies]
wry = "0.4.0"
```
## Overview
Wry connects the web engine on each platform and provides easy to use and unified interface to render WebView. It uses
[winit] on most platforms and [gtk-rs] on Linux for windows creation.
[winit]: https://crates.io/crates/winit
[gtk-rs]: https://crates.io/crates/gtk
## Usage
The minimum example looks like following:
```rust
use wry::{Application, Result};
fn main() -> Result<()> {
let mut app = Application::new()?;
app.create_window(Default::default(), None)?;
app.run();
Ok(())
}
```
For more information, please read the documentation below.
## [Documentation](https://docs.rs/wry)
## Platform-specific notes
All platforms uses [winit](https://github.com/rust-windowing/winit) to build the window except Linux. Here are the underlying web engine each platfrom uses and some dependencies you might need to install.
### Linux
Unlike other platforms, [gtk-rs](https://gtk-rs.org/) is used to build the window instead of winit. Because wry needs [WebKitGTK](https://webkitgtk.org/) and winit provides lower level of interface like x11 or wayland. Please make sure WebKitGTK is installed. If not, run the following command:
#### Arch Linux / Manjaro:
```bash
sudo pacman -S webkit2gtk
```
#### Debian / Ubuntu:
```bash
sudo apt install libwebkit2gtk-4.0-dev
```
### macOS
WebKit is native on macOS so everything should be fine.
### Windows
We use EdgeHTML provided by Windows Runtime. So only Windows 10 is supported.
## License
Apache-2.0/MIT
没有合适的资源?快使用搜索试试~ 我知道了~
误区:Rust for Tauri中的微型跨平台WebView库。 [在制品]
共18个文件
rs:11个
toml:1个
yml:1个
需积分: 50 1 下载量 104 浏览量
2021-02-15
23:03:35
上传
评论
收藏 26KB ZIP 举报
温馨提示
WRY(Webview渲染库) Rust中的跨平台WebView渲染库支持所有主要的桌面平台,例如Windows 10,macOS和Linux。 [ dependencies ] wry = " 0.4.0 " 概述 Wry连接每个平台上的Web引擎,并提供易于使用的统一界面来呈现WebView。 它在大多数平台上使用 ,在Linux上使用进行Windows创建。 用法 最小示例如下所示: use wry :: {Application, Result }; fn main () -> Result <()> { let mut app = Application :: new ()?; app. create_window ( Default :: default (), None )?; app. run (); Ok (()) } 有关更多信息
资源详情
资源评论
资源推荐
收起资源包目录
wry-master.zip (18个子文件)
wry-master
Cargo.toml 1KB
.github
workflows
build.yml 588B
src
collections.cpp 1KB
main.rs 2KB
platform
win.rs 5KB
mod.rs 1006B
macos.rs 8KB
linux.rs 4KB
collections.h 219B
lib.rs 5KB
webview.rs 8KB
application
general.rs 14KB
mod.rs 11KB
gtkrs.rs 15KB
build.rs 1KB
LICENSE 1KB
README.md 2KB
.gitignore 18B
共 18 条
- 1
GDMS
- 粉丝: 31
- 资源: 4529
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0