{"id":37682041,"url":"https://github.com/dsh0416/godot-cef","last_synced_at":"2026-05-24T06:00:28.229Z","repository":{"id":331233345,"uuid":"1125817859","full_name":"dsh0416/godot-cef","owner":"dsh0416","description":"A cross-platform GPU-accelerated CEF-based (Chromium Embedded Framework) WebView Extension for Godot 4","archived":false,"fork":false,"pushed_at":"2026-05-22T19:50:18.000Z","size":3750,"stargazers_count":168,"open_issues_count":8,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-22T21:37:10.553Z","etag":null,"topics":["cef","chromium","d3d12","gdextension","godot","godot4","metal","offscreen-rendering","vulkan","webview"],"latest_commit_sha":null,"homepage":"https://godotcef.org/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsh0416.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-31T12:25:54.000Z","updated_at":"2026-05-22T19:38:46.000Z","dependencies_parsed_at":"2026-03-05T11:09:05.152Z","dependency_job_id":null,"html_url":"https://github.com/dsh0416/godot-cef","commit_stats":null,"previous_names":["dsh0416/godot-cef"],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/dsh0416/godot-cef","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsh0416%2Fgodot-cef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsh0416%2Fgodot-cef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsh0416%2Fgodot-cef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsh0416%2Fgodot-cef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsh0416","download_url":"https://codeload.github.com/dsh0416/godot-cef/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsh0416%2Fgodot-cef/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33423284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cef","chromium","d3d12","gdextension","godot","godot4","metal","offscreen-rendering","vulkan","webview"],"created_at":"2026-01-16T12:27:13.135Z","updated_at":"2026-05-24T06:00:28.210Z","avatar_url":"https://github.com/dsh0416.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Header](./assets/github-header-banner.png)\n\n# Godot CEF\n\nA high-performance Chromium Embedded Framework (CEF) integration for Godot Engine 4.5+, written in Rust. Render web content directly inside your Godot games and applications with full support for modern web standards, JavaScript, HTML5, and CSS3.\n\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/dsh0416/godot-cef/build.yml?label=Build)](https://github.com/dsh0416/godot-cef/actions/workflows/build.yml)\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/dsh0416/godot-cef/test.yml?label=Test)](https://github.com/dsh0416/godot-cef/actions/workflows/test.yml)\n[![GitHub Release](https://img.shields.io/github/v/release/dsh0416/godot-cef)](https://github.com/dsh0416/godot-cef/releases)\n[![Godot Asset Library](https://img.shields.io/badge/Godot-Asset%20Library-478cbf?logo=godotengine\u0026logoColor=white)](https://godotengine.org/asset-library/asset/4694)\n[![GitHub Issues](https://img.shields.io/github/issues/dsh0416/godot-cef)](https://github.com/dsh0416/godot-cef/issues)\n[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/dsh0416/godot-cef)](https://github.com/dsh0416/godot-cef/pulls)\n\n## Features\n\n- **Web Rendering in Godot** — Display any web content as a texture using the `CefTexture` node (extends `TextureRect`)\n- **Accelerated Off-Screen Rendering** — GPU-accelerated rendering using platform-native graphics APIs for maximum performance\n- **Software Rendering Fallback** — Automatic fallback to CPU-based rendering when accelerated rendering is unavailable\n- **Dynamic Scaling** — Automatic handling of DPI changes and window resizing\n- **Multi-Process Architecture** — Proper CEF subprocess handling for stability and consistency\n- **Remote Debugging** — Built-in Chrome DevTools support\n- **Typed IPC (CBOR)** — Send/receive typed primitives, arrays, and binary buffers (`Variant` / JS values) without manual JSON serialization\n- **Listener-based JS Bridge** — Multi-subscriber IPC listeners via `addListener/removeListener/hasListener`\n- **No-Panic Runtime Policy** — Panics in crate runtime code are treated as bugs and blocked by lint/CI policy\n\n## Screenshots\n\n| | |\n|:---:|:---:|\n| ![GitHub rendered in Godot](./assets/screenshot_1.png) | ![Web content as 3D texture](./assets/screenshot_2.png) |\n| GitHub page rendered with full interactivity | Web content integrated into 3D scenes |\n| ![WebGPU Samples](./assets/screenshot_3.png) | ![WebGL Aquarium](./assets/screenshot_4.png) |\n| WebGPU demos running natively | WebGL Aquarium at ~120 FPS with 10,000 fish |\n\n## Quick Start\n\n### Installation\n\nDownload the latest pre-built binaries from the [Releases](https://github.com/dsh0416/godot-cef/releases) page, extract the addon to your Godot project's `addons/` folder, and you're ready to go!\n\n\u003e [!NOTE]\n\u003e 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-import`](https://github.com/LemonNekoGH/vite-plugin-keep-import-for-godot) to keep imports for selected file types.\n\n### Basic Usage\n\n```gdscript\nextends Control\n\nfunc _ready():\n    var cef_texture = CefTexture.new()\n    cef_texture.url = \"https://example.com\"\n    cef_texture.enable_accelerated_osr = true  # Enable GPU acceleration\n    add_child(cef_texture)\n```\n\n### Example with Signals\n\n```gdscript\nextends Node2D\n\n@onready var browser = $CefTexture\n\nfunc _ready():\n    # Set initial URL\n    browser.url = \"https://example.com\"\n\n    # Connect to signals\n    browser.load_finished.connect(_on_page_loaded)\n    browser.ipc_message.connect(_on_message_received)\n\nfunc _on_page_loaded(url: String, status: int):\n    print(\"Page loaded: \", url)\n\n    # Execute JavaScript\n    browser.eval(\"document.body.style.backgroundColor = '#f0f0f0'\")\n\nfunc _on_message_received(message: String):\n    print(\"Received from web: \", message)\n```\n\n## Documentation\n\nFor comprehensive API documentation, examples, and guides, visit the [full documentation](https://godotcef.org/).\n\n| Resource | Description |\n|----------|-------------|\n| [**API Reference**](https://godotcef.org/api/) | Complete CefTexture API documentation |\n| [**Properties**](https://godotcef.org/api/properties.html) | Node properties and configuration |\n| [**Methods**](https://godotcef.org/api/methods.html) | Browser control and JavaScript execution |\n| [**Signals**](https://godotcef.org/api/signals.html) | Events and notifications |\n| [**IME Support**](https://godotcef.org/api/ime-support.html) | International text input |\n\n## Platform Support\n\n| Platform | DirectX 12 | Metal | Vulkan | Software Rendering |\n|----------|------------|-------|--------|-------------------|\n| **Windows** | ✅ (Note 1) | n.a. | ✅ (Note 2) | ✅ |\n| **macOS** | n.a. | ✅ | ❌ [[#4]](https://github.com/dsh0416/godot-cef/issues/4) | ✅ |\n| **Linux** | n.a. | n.a. | ✅ (Note 2) | ✅ |\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePlatform Notes\u003c/strong\u003e\u003c/summary\u003e\n\n1. **Windows DirectX 12**: Requires at least Godot 4.6 beta 2. Godot 4.5.1 contains a bug where `RenderingDevice.get_driver_resource` on DirectX 12 textures always returns 0.\n\n2. **Vulkan Backends**: See [#4](https://github.com/dsh0416/godot-cef/issues/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](https://github.com/godotengine/godot-proposals/issues/13969) is resolved. On Linux with NVIDIA proprietary drivers, DMA-BUF acceleration requires the `nvidia-drm.modeset=1` kernel parameter; see the [Vulkan support guide](https://godotcef.org/api/vulkan-support.html#linux-nvidia-driver-requirement) for GRUB setup steps.\n\n3. **Software Rendering**: On platforms where accelerated rendering is not yet implemented, the extension automatically falls back to software rendering using CPU-based frame buffers.\n\n\u003c/details\u003e\n\n## Limitations\n\n### Media Codec Support\n\nThe 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.\n\n| Codec Type | Supported (Royalty-Free) | Not Supported (Proprietary) |\n|------------|--------------------------|----------------------------|\n| **Video** | VP8, VP9, AV1, Theora | H.264/AVC, H.265/HEVC |\n| **Audio** | Opus, Vorbis, FLAC, WAV, PCM | MP3, AAC |\n| **Container** | WebM, Ogg, WAV | MP4 (with H.264/AAC) |\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eUsing Royalty-Free Alternatives\u003c/strong\u003e\u003c/summary\u003e\n\nFor best compatibility, encode your media using these royalty-free formats:\n\n**Recommended for video:** WebM container with VP9 or AV1 video and Opus audio\n```bash\n# Convert video to WebM (VP9 + Opus)\nffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 -c:a libopus -b:a 128k output.webm\n\n# Convert video to WebM (AV1 + Opus) - better compression, slower encoding\nffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -c:a libopus -b:a 128k output.webm\n```\n\n**Recommended for audio:** Opus in WebM/Ogg container\n```bash\n# Convert audio to Opus\nffmpeg -i input.mp3 -c:a libopus -b:a 128k output.ogg\n```\n\nThese formats offer comparable or better quality than proprietary alternatives and work out of the box.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding CEF with Proprietary Codecs (Advanced)\u003c/strong\u003e\u003c/summary\u003e\n\nIf you require H.264/AAC/MP3 support, you must build CEF from source with proprietary codec flags enabled:\n\n```\nproprietary_codecs=true\nffmpeg_branding=Chrome\n```\n\n**Important considerations:**\n- Building CEF requires ~100GB disk space and several hours\n- H.264 licensing may apply depending on distribution scale\n- FFmpeg licensing terms (LGPL/GPL) must be followed\n- You assume responsibility for codec licensing compliance\n\nSee the [CEF build documentation](https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding) for detailed instructions.\n\n\u003c/details\u003e\n\n## Building from Source\n\nFor detailed build instructions, see [CONTRIBUTING.md](CONTRIBUTING.md#development-setup).\n\n### Quick Build Steps\n\n1. **Install prerequisites**: [mise](https://mise.jdx.dev/) and Godot 4.5+\n\n2. **Install the project toolchain**:\n   ```bash\n   mise trust\n   mise install\n   ```\n\n   The commands below assume mise shell integration is active. If your shell is not configured for mise activation yet, prefix commands with `mise exec --`.\n\n3. **Install CEF binaries**:\n   ```bash\n   export CEF_PATH=\"$HOME/.local/share/cef\"\n   export-cef-dir --version \"$CEF_VERSION\" --force \"$CEF_PATH\"\n   ```\n\n   `CEF_VERSION` is pinned in `mise.toml` to the CEF runtime build version from the resolved `cef` / `cef-dll-sys` crate in `Cargo.lock`. For example, crate version `148.1.0+147.0.14` uses CEF runtime `147.0.14`.\n\n4. **Build**:\n   ```bash\n   cargo xtask bundle --release\n   ```\n\n5. **Copy to Godot project**: Copy built artifacts from `target/release/` to your project's `addons/godot_cef/bin/\u003cplatform\u003e/` folder.\n\nSee the `addons/godot_cef/godot_cef.gdextension` file for the complete list of required files per platform.\n\n### Validate Packaged Addon\n\nYou can validate bundled addon artifacts with:\n\n```bash\ncargo xtask validate --addon addons/godot_cef\n```\n\n## No-Panic Policy\n\nThis project treats panics in crate runtime code as bugs. We do not use panic-based control flow.\n\n- Workspace lint policy denies `panic!`, `unwrap()`, `expect()`, `todo!()`, and `unimplemented!()`.\n- `cargo clippy --workspace --all-targets -- -D warnings` is used as a CI gate.\n- Release builds use `panic = \"abort\"` to prevent unwind-based panic behavior in production artifacts.\n\nIf you find a runtime panic path, please open an issue or submit a fix.\n\n## Comparison with Similar Projects\n\n| Feature | **Godot CEF** (this project) | [godot_wry](https://github.com/doceazedo/godot_wry) | [gdcef](https://github.com/Lecrapouille/gdcef) |\n|---------|------------------------------|-----------------------------------------------------|------------------------------------------------|\n| **Browser Engine** | Chromium (CEF) | Native OS webview (WRY) | Chromium (CEF) |\n| **Implementation** | Rust | Rust | C++ |\n| **Rendering** | Texture (OSR) | Window overlay | Texture (OSR) |\n| **GPU Acceleration** | ✅ Yes | ✅ Yes | ❌ Software only |\n| **3D Scene Support** | ✅ Yes | ❌ No (always on top) | ✅ Yes |\n| **HiDPI Aware** | ✅ Yes | ✅ Yes | ❌ No |\n| **Consistent Cross-Platform** | ✅ Same engine everywhere | ❌ Different engines | ✅ Same engine everywhere |\n| **JS ↔ GDScript IPC** | ✅ Yes | ✅ Yes | ✅ Yes |\n| **Godot Filesystem Access** | ✅ Yes (`res://`) | ✅ Yes | ❌ No |\n| **Project Export** | ✅ Yes | ✅ Yes | ❌ No |\n| **Headless CI Support** | ✅ Yes | ❌ No | ✅ Yes |\n| **Bundle Size** | Large (~100MB+) | Small (uses OS webview) | Large (~100MB+) |\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWhen to Use Each\u003c/strong\u003e\u003c/summary\u003e\n\n**Choose Godot CEF (this project) if you need:**\n- GPU-accelerated web rendering for high performance\n- Smooth and high performance interactive UI\n- Web content as a texture in 3D scenes (e.g., in-game screens, VR/AR interfaces)\n- Consistent behavior across all platforms (same Chromium engine everywhere)\n- Modern Rust codebase with godot-rust\n\n**Choose godot_wry if you need:**\n- Minimal bundle size (uses the OS's built-in webview)\n- Simple overlay UI that doesn't need to be part of the 3D scene\n- Lightweight integration without bundling a full browser\n\n**Choose gdcef if you need:**\n- C++ codebase for a more mature CEF integration with more docs\n- Proven, mature implementation with longer history\n\n\u003c/details\u003e\n\n### Motivation\n\nThis project was created during development of [Engram](https://store.steampowered.com/app/3928930/_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.\n\n## Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on:\n\n- Setting up your development environment\n- Code style and testing requirements\n- Pull request process\n- Reporting issues\n\n## License\n\nMIT License — Copyright 2025-2026 Delton Ding\n\nSee [LICENSE](LICENSE) for details.\n\n## Related Repositories\n\n- [custom-unit-pxp](https://github.com/LemonNekoGH/custom-unit-pxp): A set of packages for the custom `pxp` unit (`px` + `var`) that can be useful for game UI workflows.\n\n## Acknowledgments\n\n- [godot_wry](https://github.com/doceazedo/godot_wry)\n- [gdcef](https://github.com/Lecrapouille/gdcef)\n- [CEF (Chromium Embedded Framework)](https://bitbucket.org/chromiumembedded/cef)\n- [godot-rust](https://github.com/godot-rust/gdext)\n- [cef-rs](https://github.com/tauri-apps/cef-rs)\n\n## Star History\n\n\u003ca href=\"https://www.star-history.com/#dsh0416/godot-cef\u0026type=timeline\u0026legend=top-left\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=dsh0416/godot-cef\u0026type=timeline\u0026theme=dark\u0026legend=top-left\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=dsh0416/godot-cef\u0026type=timeline\u0026legend=top-left\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=dsh0416/godot-cef\u0026type=timeline\u0026legend=top-left\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsh0416%2Fgodot-cef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsh0416%2Fgodot-cef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsh0416%2Fgodot-cef/lists"}