Using subxt with bevy engine
You need to install crossbundle if you haven't already. See documention to install it and configure your project.
bevyin your Cargo.toml. We prefer to use versions below:
[dependencies] subxt = "0.23" bevy = "0.8.1"
You might need additional dependencies to write your code. See examples/bevy-explorer/cargo.toml
Bevy explorer example
To learn how to use subxt with bevy engine, you can go to the examples/bevy-explorer or install bevy explorer template. Follow next steps:
- Install cargo-generate:
cargo install cargo-generate
- Install bevy-explorer template:
crossbundle new example --template=bevy-explorer
- After previous steps, now you can install the application on the device.
Installing application on the device
You can deploy the application on your device or android emulator with commands below. At first, you should go to example directory. Use it:
If the template was installed
If bevy-explorer example will be used
crossbundle build android command will generate gradle project and install apk on your device. To build native
.aab see commands below.
To build native APK and run it on the device using the command. If you want to build an application replaces
crossbundle run android -s=native-apk
crossbundle run ios
To build native AAB and run it on the device using the command. If you want to build an application replaces
crossbundle run android -s=native-aab