mirror of
https://github.com/aphrody-labs/cef-rs.git
synced 2026-10-13 21:06:46 +00:00
ee9799485313a590c9440f45e5a3d8b1fc344053
cef-rs
Use CEF in Rust.
Supported Targets
| Target | Linux | macOS | Windows |
|---|---|---|---|
| x86_64 | ✅ | ✅ | ✅ |
| ARM64 | ✅ | ✅ | ✅ |
Usage
Linux
Manual Install
-
Download Linux-64bit build.
-
Copy files to
.local:
cp -r Resources ~/.local/share/cef
cp -r Release ~/.local/share/cef
- Build and run the application with
LD_LIBRARY_PATH(or you can also add rpath to your cargo config or build script):
LD_LIBRARY_PATH=~/.local/share/cef cargo r --example demo
Flatpak
- Install flatpak runtime & sdk:
flatpak install flathub dev.crabnebula.Platform
flatpak install flathub dev.crabnebula.Sdk
-
Setup cargo project for flatpak. See flatpak-builder-tools for more details. Here are files you will need to have at leaset:
- flatpak-cargo-generator.py
- flatpak manifest file (ie. app.example.demo.yml)
-
Build the flatpak application and run:
cargo b --example demo
python3 ./flatpak-cargo-generator.py ./Cargo.lock -o cargo-sources.json
touch run.sh
flatpak-builder --user --install --force-clean target app.example.demo.yml
flatpak run app.example.demo
macOS
- Download cef prebuilts with
update-bindings, it should print out the extractedCEF_PATHon success.
cargo run -p update-bindings --bindgen --download
- Build and run the cefsimple application
export CEF_PATH=<path>
./cef/examples/cefsimple/bundle_script.rs
open target/debug/examples/cefsimple.app
Contributing
Please see CONTRIBUTING.md for details.
Languages
Rust
98.1%
C
1%
Nix
0.9%