Wef
Wef is a Rust library for embedding WebView functionality using Chromium Embedded Framework (CEF3) with offscreen rendering support.
Install / Use
/learn @longbridge/WefREADME
Wef
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.
Features
- 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
Quick Start
Installation
Add wef to your Cargo.toml:
[dependencies]
wef = "0.6.0"
Install cargo-wef
cargo install cargo-wef
Initialize CEF
cargo wef init
Basic Usage
use wef::Settings;
fn main() {
let settings = Settings::new();
wef::launch(settings, || {
// Your application logic here
});
}
Development
Building
# Build the library
cargo wef build
# Run tests
cargo test --all
# Run an example
cargo wef run -p wef-winit
Requirements
- 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:
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
License
Licensed under the Apache License, Version 2.0. See LICENSE-APACHE for details.
Related Skills
openhue
345.4kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
345.4kElevenLabs text-to-speech with mac-style say UX.
weather
345.4kGet current weather and forecasts via wttr.in or Open-Meteo
tweakcc
1.5kCustomize Claude Code's system prompts, create custom toolsets, input pattern highlighters, themes/thinking verbs/spinners, customize input box & user message styling, support AGENTS.md, unlock private/unreleased features, and much more. Supports both native/npm installs on all platforms.
