/cef-ui

This repository contains a bridge between Rust and the Chromium Embedded Framework.

Primary LanguageRustMIT LicenseMIT

cef-ui

This repository wraps the Chromium Embedded Framework (CEF) in Rust. CEF is a project that allows you to embed Chromium web views in native applications. You can read more about it here. A high level overview of CEF can be found here. Details about CEF C interop can be found here.

Approach

We use Rust bindgen to generate bindings around CEF's C API. Unit tests and comments have been stripped out of the generated Rust bindings. Some C types (like #define's) have been added manually.

All generated CEF types are wrapped in sane Rust types. This is to simplify things like reference counting and make things easy to use.

Crates

Here is an overview of all crates in the repository:

Crate Purpose
cef-ui The base CEF implementation.
cef-ui-helper The helper library (for macOS).
cef-ui-simple The main binary for the simple example.
cef-ui-helper The helper binary for the simple example (for macOS).
cef-ui-tools Tools for building the project, cleaning, etc.
cef-ui-util A library that contains tool commands, functions to simplify linking, etc.

The cef-ui-tools crate exists to deal with platform-specific issues in pure Rust. For example, on macOS, CEF will only function if it adheres to its app bundle structure.

Installation

Run configurations exist if you're using VSCode. More to come.

Status

This is a work in progress and is nowhere near complete. Many C types have not yet been wrapped. At present, we target version 121.3.15+g4d3b0b4+chromium-121.0.6167.184.

Platform Arch Builds Downloads
Linux x86_64 cef_binary_121.3.15+g4d3b0b4+chromium-121.0.6167.184_linux64_minimal
macOS arm64 cef_binary_121.3.15+g4d3b0b4+chromium-121.0.6167.184_macosarm64_minimal
Windows x86_64 cef_binary_121.3.15+g4d3b0b4+chromium-121.0.6167.184_windows64_minimal