
Godot CEF
A high-performance Chromium Embedded Framework (CEF) integration for Godot Engine 4.6+, written in Rust. Render web content directly inside your Godot games and applications with full support for modern web standards, JavaScript, HTML5, and CSS3.
Features
- Web Rendering in Godot — Display any web content as a texture using the
CefTexturenode (extendsTextureRect) - Accelerated Off-Screen Rendering — GPU-accelerated rendering using platform-native graphics APIs for maximum performance
- Software Rendering Fallback — Automatic fallback to CPU-based rendering when accelerated rendering is unavailable
- Dynamic Scaling — Automatic handling of DPI changes and window resizing
- Multi-Process Architecture — Proper CEF subprocess handling for stability and consistency
- Remote Debugging — Built-in Chrome DevTools support
- Typed IPC (CBOR) — Send/receive typed primitives, arrays, and binary buffers (
Variant/ JS values) without manual JSON serialization - Listener-based JS Bridge — Multi-subscriber IPC listeners via
addListener/removeListener/hasListener - No-Panic Runtime Policy — Panics in crate runtime code are treated as bugs and blocked by lint/CI policy
Screenshots
![]() |
![]() |
| GitHub page rendered with full interactivity | Web content integrated into 3D scenes |
![]() |
![]() |
| WebGPU demos running natively | WebGL Aquarium at ~120 FPS with 10,000 fish |
Quick Start
Installation
Download the latest pre-built binaries from the Releases page, extract the addon to your Godot project's addons/ folder, and you're ready to go!
Note
During export/package builds, Godot may convert some imported assets into other formats. If your frontend is built with Vite and needs specific source files to remain as-is, you can use
vite-plugin-godot-keep-importto keep imports for selected file types.
Basic Usage
extends Control
func _ready():
var cef_texture = CefTexture.new()
cef_texture.url = "https://example.com"
cef_texture.enable_accelerated_osr = true # Enable GPU acceleration
add_child(cef_texture)
Example with Signals
extends Node2D
@onready var browser = $CefTexture
func _ready():
# Set initial URL
browser.url = "https://example.com"
# Connect to signals
browser.load_finished.connect(_on_page_loaded)
browser.ipc_message.connect(_on_message_received)
func _on_page_loaded(url: String, status: int):
print("Page loaded: ", url)
# Execute JavaScript
browser.eval("document.body.style.backgroundColor = '#f0f0f0'")
func _on_message_received(message: String):
print("Received from web: ", message)
Documentation
For comprehensive API documentation, examples, and guides, visit the full documentation.
| Resource | Description |
|---|---|
| API Reference | Complete CefTexture API documentation |
| Properties | Node properties and configuration |
| Methods | Browser control and JavaScript execution |
| Signals | Events and notifications |
| IME Support | International text input |
Platform Support
The default/full GitHub Release addon includes Windows x86_64/ARM64, Linux
x86_64/ARM64, and macOS universal (x86_64/ARM64). A separate Asset Store addon
includes Windows x86_64, Linux x86_64, and the same macOS universal framework to
reduce download size. Both packages install as addons/godot_cef; choose one.
ARM64 Windows/Linux users should use the full package. See
Distribution variants for
package names, local packaging commands and source-build instructions.
| Platform | DirectX 12 | Metal | Vulkan | Software Rendering |
|---|---|---|---|---|
| Windows | ✅ (Note 1) | n.a. | ✅ (Note 2) | ✅ |
| macOS | n.a. | ✅ | ❌ [#4] | ✅ |
| Linux | n.a. | n.a. | ✅ (Note 2) | ✅ |
Platform Notes
-
Windows DirectX 12: Uses the native texture and command queue exposed by Godot 4.6+. See Accelerated frame handoff.
-
Vulkan Backends: See #4 for details. On Windows and Linux, we use hooking to inject extensions for GPU-accelerated rendering (x86_64 only). This is a workaround until godotengine/godot-proposals#13969 is resolved. On Linux with NVIDIA proprietary drivers, DMA-BUF acceleration requires the
nvidia-drm.modeset=1kernel parameter; see the Vulkan support guide for GRUB setup steps. -
Software Rendering: On platforms where accelerated rendering is not yet implemented, the extension automatically falls back to software rendering using CPU-based frame buffers.
Limitations
Media Codec Support
The prebuilt CEF binaries do not include proprietary codecs (H.264, AAC, MP3) due to licensing restrictions in the Chromium/CEF stack. This is an upstream limitation that cannot be addressed within this project.
| Codec Type | Supported (Royalty-Free) | Not Supported (Proprietary) |
|---|---|---|
| Video | VP8, VP9, AV1, Theora | H.264/AVC, H.265/HEVC |
| Audio | Opus, Vorbis, FLAC, WAV, PCM | MP3, AAC |
| Container | WebM, Ogg, WAV | MP4 (with H.264/AAC) |
Using Royalty-Free Alternatives
For best compatibility, encode your media using these royalty-free formats:
Recommended for video: WebM container with VP9 or AV1 video and Opus audio
# Convert video to WebM (VP9 + Opus)
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 -c:a libopus -b:a 128k output.webm
# Convert video to WebM (AV1 + Opus) - better compression, slower encoding
ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -c:a libopus -b:a 128k output.webm
Recommended for audio: Opus in WebM/Ogg container
# Convert audio to Opus
ffmpeg -i input.mp3 -c:a libopus -b:a 128k output.ogg
These formats offer comparable or better quality than proprietary alternatives and work out of the box.
Building CEF with Proprietary Codecs (Advanced)
If you require H.264/AAC/MP3 support, you must build CEF from source with proprietary codec flags enabled:
proprietary_codecs=true
ffmpeg_branding=Chrome
Important considerations:
- Building CEF requires ~100GB disk space and several hours
- H.264 licensing may apply depending on distribution scale
- FFmpeg licensing terms (LGPL/GPL) must be followed
- You assume responsibility for codec licensing compliance
See the CEF build documentation for detailed instructions.
Building from Source
For detailed build instructions, see CONTRIBUTING.md.
Quick Build Steps
-
Install prerequisites: mise and Godot 4.6+
-
Install the project toolchain:
mise trust mise installThe commands below assume mise shell integration is active. If your shell is not configured for mise activation yet, prefix commands with
mise exec --. -
Install CEF binaries:
export CEF_PATH="$HOME/.local/share/cef" CEF_VERSION="$(mise run --quiet cef-version)" || exit 1 export-cef-dir --version "$CEF_VERSION" --force "$CEF_PATH"mise run cef-versionreads the matching CEF runtime version from thecef/cef-dll-sysbuild metadata inCargo.lock. The command above uses quiet output and preserves the lockfile while capturing that version. -
Build:
mise run bundle --release -
Copy to Godot project: Copy the assembled
addons/godot_cef/directory into your project'saddons/folder.
Build tasks run TypeScript directly with the pinned Node 26. mise run cef-version
installs only the small scripts/build package on first use; it does not compile
Rust or install the documentation site's dependencies. mise run bundle runs
build before assemble. Use mise run assemble with the same flags to assemble
existing binaries without invoking Cargo. Rust outputs use target/<triple>/<profile>/
(or --target-dir / CARGO_TARGET_DIR); the macOS universal framework also lives
in target/<profile>/Godot CEF.framework.
See the addons/godot_cef/godot_cef.gdextension file for the complete list of required files per platform.
Validate Packaged Addon
You can validate bundled addon artifacts with:
mise run validate --addon addons/godot_cef
No-Panic Policy
This project treats panics in crate runtime code as bugs. We do not use panic-based control flow.
- Workspace lint policy denies
panic!,unwrap(),expect(),todo!(), andunimplemented!(). cargo clippy --workspace --all-targets -- -D warningsis used as a CI gate.- Release builds use
panic = "abort"to prevent unwind-based panic behavior in production artifacts.
If you find a runtime panic path, please open an issue or submit a fix.
Comparison with Similar Projects
| Feature | Godot CEF (this project) | godot_wry | gdcef |
|---|---|---|---|
| Browser Engine | Chromium (CEF) | Native OS webview (WRY) | Chromium (CEF) |
| Implementation | Rust | Rust | C++ |
| Rendering | Texture (OSR) | Window overlay | Texture (OSR) |
| GPU Acceleration | ✅ Yes | ✅ Yes | ❌ Software only |
| 3D Scene Support | ✅ Yes | ❌ No (always on top) | ✅ Yes |
| HiDPI Aware | ✅ Yes | ✅ Yes | ❌ No |
| Consistent Cross-Platform | ✅ Same engine everywhere | ❌ Different engines | ✅ Same engine everywhere |
| JS ↔ GDScript IPC | ✅ Yes | ✅ Yes | ✅ Yes |
| Godot Filesystem Access | ✅ Yes (res://) |
✅ Yes | ❌ No |
| Project Export | ✅ Yes | ✅ Yes | ❌ No |
| Headless CI Support | ✅ Yes | ❌ No | ✅ Yes |
| Bundle Size | Large (~100MB+) | Small (uses OS webview) | Large (~100MB+) |
When to Use Each
Choose Godot CEF (this project) if you need:
- GPU-accelerated web rendering for high performance
- Smooth and high performance interactive UI
- Web content as a texture in 3D scenes (e.g., in-game screens, VR/AR interfaces)
- Consistent behavior across all platforms (same Chromium engine everywhere)
- Modern Rust codebase with godot-rust
Choose godot_wry if you need:
- Minimal bundle size (uses the OS's built-in webview)
- Simple overlay UI that doesn't need to be part of the 3D scene
- Lightweight integration without bundling a full browser
Choose gdcef if you need:
- C++ codebase for a more mature CEF integration with more docs
- Proven, mature implementation with longer history
Motivation
This project was created during development of Engram. While our first demo version benefited greatly from an interactive UI written in Vue.js using godot_wry, we encountered limitations with the wry-based approach. Since other implementations have long struggled with GPU-accelerated OSR, we decided to create our own solution.
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines on:
- Setting up your development environment
- Code style and testing requirements
- Pull request process
- Reporting issues
License
MIT License — Copyright 2025-2026 Delton Ding
See LICENSE for details.
Related Repositories
- custom-unit-pxp: A set of packages for the custom
pxpunit (px+var) that can be useful for game UI workflows.



