Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
bevy_cef
A powerful Bevy plugin for embedding web content using the Chromium Embedded Framework (CEF). Render websites, local HTML files, and web applications directly onto 3D meshes or 2D sprites with full interactivity and bidirectional communication between JavaScript and Bevy.
https://github.com/user-attachments/assets/54f476d0-8eda-4030-a3f6-dc4f2f54209f
โจ Features
- ๐ Full Web Browser Integration - Embed complete web pages with CSS, JavaScript, and modern web APIs
- ๐ฎ 3D Mesh & 2D Sprite Rendering - Render web content on any 3D surface or 2D sprite
- โก Interactive Input - Full mouse, keyboard, and touch input support with automatic event forwarding
- ๐ Bidirectional Communication - Seamless data exchange between JavaScript and Bevy systems
- ๐ Local Asset Serving - Serve local HTML/CSS/JS files with hot reload support
- ๐ ๏ธ Developer Tools - Full Chrome DevTools integration for debugging
- ๐ฏ Navigation Controls - Browser history, zoom, audio controls, and more
- ๐ Multi-Process Architecture - Secure CEF multi-process design for stability
๐ฆ Installation
Add to your Cargo.toml
:
[]
= "0.16"
= "0.1.0"
Platform Requirements
On macOS, using CEF typically requires creating an app bundle.
For development, this library provides a debug
feature flag.
When enabled, it installs a debug renderer process and the CEF framework locally so the app can run standalone.
[!NOTE] Use this feature only during development; for releases, bundle the renderer process and the CEF framework inside the app.
Manual Installation(macOS)
> cargo install export-cef-dir
> export-cef-dir --force $HOME/.local/share/cef
> cargo install bevy_cef_debug_render_process
Examples
See examples/
.
On macOS, you need to enable debug
feature enabled:
cargo run --example simple --features debug
๐ Platform Support
Platform | Status | Notes |
---|---|---|
macOS | โ Full | Primary development platform |
Windows | โ ๏ธ Planned | CEF support ready, testing needed |
Linux | โ ๏ธ Planned | CEF support ready, testing needed |
๐ค Contributing
We welcome contributions! Here's how you can help:
- ๐ Bug Reports - Open an issue with detailed reproduction steps
- ๐ก Feature Requests - Suggest new features or improvements
- ๐ง Pull Requests - Submit bug fixes or new features
- ๐ Documentation - Improve docs, examples, or tutorials
- ๐งช Testing - Help test on different platforms
Development Setup
- Clone the repository
- Install Rust and Cargo
- Run
cargo build --features debug
to set up CEF - Run examples to test functionality
Code Standards
- Follow Rust style guidelines (
cargo fmt
) - Pass all lints (
cargo clippy
) - Add tests for new features
- Update documentation for API changes
๐ Version Compatibility
Bevy | bevy_cef | CEF | Status |
---|---|---|---|
0.16 | 0.1.0 | 138 | โ Current |
โ๏ธ License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Built with ๐ฆ Rust and โค๏ธ for the Bevy community