There is an online version available in: https://doup.github.io/birp/
Warning
Note that you need to configure CORS headers in RemoteHttpPlugin for this to work.
See "Configuring Bevy" section.
- Install the Dioxus CLI
- Run the following command to build the app:
dx bundle --release -p app_dx
- The binary will be located in
/app_dx/distdirectory.
To enable the Bevy Remote Protocol (BRP) in your Bevy project, enable bevy_remote feature:
[dependencies]
bevy = { version = "0.17", features = ["bevy_remote"] }Then add the following plugins to your game/app:
use bevy::remote::{
http::{Headers, RemoteHttpPlugin},
RemotePlugin,
};
fn main() {
// Optional: allow `https://doup.github.io` to access the BRP API
let cors_headers = Headers::new()
.insert("Access-Control-Allow-Origin", "https://doup.github.io")
.insert("Access-Control-Allow-Headers", "Content-Type");
App::new()
.add_plugins(RemotePlugin::default()) // 👈 ADD THIS
.add_plugins(RemoteHttpPlugin::default().with_headers(cors_headers)) // 👈 ADD THIS
.run();
}| Bevy version | |
|---|---|
main (branch) |
0.17 |
v0.16 (tag) |
0.16 |
To start the dev server, run:
dx serve -p app_dx --platform desktop
dx serve -p app_dx --platform web --port 8008dx bundle --release -p app_dx --platform web
cd dist/public
python3 -m http.server 8008