Files
cef-rs/README.md
T

78 lines
2.1 KiB
Markdown
Raw Normal View History

2023-06-01 15:05:02 +08:00
# cef-rs
Use CEF in Rust.
## Supported Targets
| Target | Linux | macOS | Windows |
| ------ | ----- | ----- | ------- |
| x86_64 | ✅ | ❎ | ❎ |
2023-10-19 22:22:45 +09:00
| ARM64 | ✅ | ❎ | ❎ |
2023-06-01 15:05:02 +08:00
## Usage
### Linux
2023-06-08 13:36:19 +08:00
#### Manual Install
- [Download](https://cef-builds.spotifycdn.com/index.html#linux64) Linux-64bit build.
- Copy files to `.local`:
```
2023-10-20 20:58:42 +09:00
cp -r Resources ~/.local/share/cef
cp -r Release ~/.local/share/cef
2023-06-08 13:36:19 +08:00
```
2023-10-20 20:58:42 +09:00
- Build and run the application with `LD_LIBRARY_PATH` (or you can also add rpath to your cargo config or build script):
2023-06-08 13:36:19 +08:00
```
LD_LIBRARY_PATH=~/.local/share/cef cargo r --example demo
```
#### Flatpak
2023-06-01 15:05:02 +08:00
- Install flatpak runtime & sdk:
```
2023-06-01 19:13:42 +08:00
flatpak install flathub dev.crabnebula.Platform
flatpak install flathub dev.crabnebula.Sdk
2023-06-01 15:05:02 +08:00
```
- Setup cargo project for flatpak. See [flatpak-builder-tools](https://github.com/flatpak/flatpak-builder-tools/blob/master/cargo/README.md) for more details. Here are files you will need to have at leaset:
- flatpak-cargo-generator.py
2023-06-01 19:13:42 +08:00
- flatpak manifest file (ie. app.example.demo.yml)
2023-06-01 15:05:02 +08:00
- Build the flatpak application and run:
```
cargo b --example demo
2023-06-01 19:13:42 +08:00
python3 ./flatpak-cargo-generator.py ./Cargo.lock -o cargo-sources.json
2023-06-01 15:05:02 +08:00
touch run.sh
2023-06-01 19:13:42 +08:00
flatpak-builder --user --install --force-clean target app.example.demo.yml
flatpak run app.example.demo
2023-06-01 15:05:02 +08:00
```
## Contributing
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
## Roadmap
2023-10-20 20:58:42 +09:00
Cef-rs is looking for the best approach to use CEF. On Linux, this is achived by using same local share directory or same flatpak runtime.
So every application can share the same library. We are looking for the similar methods on macOS and Windows.
Welcome to open feature requests if the feature you look for isn't listed below.
But please understand that some requests might result into not planned.
2023-06-01 15:05:02 +08:00
### Planned
2023-10-20 20:58:42 +09:00
- [x] Add Linux ARM64 target
2023-06-01 15:05:02 +08:00
- [ ] Add macOS ARM64 target
- [ ] Add Windows x86_64 target
### Not Planned
- Other package formats on Linux.
- Add all possible ergonomic interfaces (ie. builder types for attributes and settings.)
- Provide tools to bundle and distribute application.
2023-10-20 20:58:42 +09:00