* update: enable message loop work for Windows and Linux * update: upgrade Bevy to version 0.18 and adjust asset loader for path handling * update: rename bevy_picking to picking in Cargo.toml * update: remove pull_request trigger from CI and change AmbientLight to GlobalAmbientLight * update: remove demo example from workspace and exclude it from tests * update: remove demo package from Cargo.lock --------- Co-authored-by: not-elm <elmgameinfo@gmail.com>
2.1 KiB
2.1 KiB
Repository Guidelines
Project Structure & Module Organization
src/: Publicbevy_cefcrate API surface.crates/bevy_cef_core: Core CEF integration and IPC.crates/bevy_cef_debug_render_process: Debug render-process tool.examples/: Runnable samples (e.g.,simple.rs,js_emit.rs,brp.rs).assets/: Local HTML/CSS/JS served viacef://localhost/.docs/: Supporting documentation.
Build, Test, and Development Commands
cargo build --features debug: Build with macOS debug tooling enabled.cargo run --example simple --features debug: Run a basic webview example.cargo test --workspace --all-features: Run tests (currently no automated tests; validates compilation).make fix: Runcargo clippy --fixandcargo fmt --all.make install: Install and copy the debug render process into the CEF framework (macOS).
Coding Style & Naming Conventions
- Rust 2024 edition; format with
cargo fmtbefore committing. - Lint with
cargo clippy(seemake fix). - Naming:
snake_casefor modules/functions/files,CamelCasefor types/traits,SCREAMING_SNAKE_CASEfor constants. - Prefer small, focused modules; keep public API in
src/and implementation incrates/.
Testing Guidelines
- No dedicated test suite yet; rely on examples for manual verification.
- Use
examples/to validate features (IPC, navigation, zoom, devtools). - If adding tests, keep names descriptive (e.g.,
test_ipc_roundtrip) and run withcargo test --workspace --all-features.
Commit & Pull Request Guidelines
- Commit subjects are short, imperative; common prefixes include
add:,fix:,update:,remove:. - Include PR or issue references when relevant (e.g.,
Support Bevy 0.17 (#11)). - PRs should describe changes, testing performed, and target platform (macOS/Windows/Linux).
- For webview or UI changes, include screenshots or short clips when possible.
Platform & Configuration Notes
- Primary development target is macOS; CEF framework should exist at
$HOME/.local/share/cef. - Local assets are served as
cef://localhost/<file>; preferCefWebviewUri::local("file.html").