Web Embedding Framework
Warning
This is an experimental project, we was tried to build a offscreen rendering WebView for solve GPUI render level issues in game engine, but there still not good enough.
For example, the app size (included a CEF Framework increase 1GB), development experience, etc.
So, we are still use Wry in Longbridge desktop app for now.
Wef (Web Embedding Framework) is a Rust library for embedding WebView functionality using Chromium Embedded Framework (CEF3) with offscreen rendering support.
The
Wefname is an abbreviation of "Web Embedding Framework", and it's also inspired by Wry.
- Cross-Platform: Support for Windows, macOS, and Linux
- CEF3 Integration: Built on top of Chromium Embedded Framework for reliable web rendering
- Offscreen Rendering: Advanced rendering capabilities with offscreen support
- JavaScript Bridge: Seamless communication between Rust and JavaScript
- Multi-Process Architecture: Leverages CEF's multi-process design for stability
- Cargo Integration: Complete toolchain with
cargo-weffor easy development
Add wef to your Cargo.toml:
[dependencies]
wef = "0.6.0"cargo install cargo-wefcargo wef inituse wef::Settings;
fn main() {
let settings = Settings::new();
wef::launch(settings, || {
// Your application logic here
});
}# Build the library
cargo wef build
# Run tests
cargo test --all
# Run an example
cargo wef run -p wef-winit- CEF binary distribution (automatically downloaded by
cargo-wef) - Platform-specific dependencies:
- Linux:
libglib2.0-dev,pkg-config - Windows: Visual Studio Build Tools
- macOS: Xcode Command Line Tools
- Linux:
We welcome contributions! Please see our Contributing Guidelines for details.
Licensed under the Apache License, Version 2.0. See LICENSE-APACHE for details.
