A goal of the crossbow
project is to provide a complete infrastructure for cross-platform game development in rust. In addition, the project simplifies the creation and packaging of crates for Android, iOS, and other platforms. We want to make most of our tools - engine agnostic, to help rust game developers integrate them into their games, engines, and crates.
Crate structure:
| Name | Description | Status |
| ---- | ----------- | ------ |
| crossbundle | Command-line tool for building applications | β
|
| crossbundle-install | Crossbundle install command to install necessary packages | β
|
| crossbundle-tools | Toolkit used in crossbundle
to build/pack/sign bundles | β
|
| crossbundle-derive | Derive macros for projects built with crossbow
| β
|
| crossbow-ads | Plugin for advertisements | π |
| android-tools-rs | Android-related tools for building and developing application | β
|
| android-manifest-rs | AndroidManifest serializer and deserializer for Rust | β
|
| apple-bundle-rs | AppleBundleResources serializer and deserializer for Rust | β
|
Packaging status:
| Name | Description | Status |
| ---- | ----------- | ------ |
| Android APK | Default build result method. | β
|
| Android AAB | Supported via --aab
flag. | β
|
| Apple Debug IPA | Default build result method. Works only on Simulator and could be run on iPhone with Dev Certificate. | π |
| Apple Release IPA | Not supported yet. Crossbundle should generate xcodeproj
, but user should build and sign IPA manually. | π |
Supported game engines:
| Name | Description | Status |
| ---- | ----------- | ------ |
| Bevy | Default build method. Injects ndk-glue into generated tmp lib.rs
file. | β
|
| Macroquad | Supported via --quad
flag. Works as cargo-quad-apk but with all crossbundle
features. | β
|
P.S: If you don't find your engine here, open an issue! We are happy to add support for new engines.
β = Works and tested β π = Works but may contain bugs β π = Under development β π = Planned
To install crossbundle, run:
sh
cargo install --git=https://github.com/dodorare/crossbow crossbundle
See installation documentation for more details on how to setup environment on your platform.
See Hello World example here.
To learn how to run an example project on your own, build, test, and start using crossbow
- read our full documentation here.
If you want learn more about crossbundle
we recommend that you read the information below.
β οΈNOTEβ οΈ
For the correct work of the tool, you need to set up a development environment (ex. install some libraries and tools - such as Android SDK, Android NDK, XCode, etc). More information about how to set up the environment in the Android setup and iOS setup here.
The crossbundle is a command-line tool that encapsulates boring stuff of Android and iOS build/packaging processes and helps mobile developers to create and maintain applications written in rust programming language.
To see full Cargo.toml Metadata documentation, visit crossbundle README.
To see the complete documentation for each command/subcommand you can write -h
or --help
:
```sh crossbundle -h crossbundle build android -h crossbundle run apple -h crossbundle install -h
```
Result of crossbundle -h
:
```text
USAGE:
crossbundle [OPTIONS]
OPTIONS:
-c, --current-dir
SUBCOMMANDS:
build Starts the process of building/packaging/signing of the rust crate
help Print this message or the help of the given subcommand(s)
install Installs bundletool and Android Studio's sdkmanager
log Attach logger to device with running application
new Creates a new Cargo package in the given directory. Project will be ready to
build with crossbundle
run Executes build
command and then deploy and launches the application on the
device/emulator
```
If you ran into problem of missing shared library in the apk/aab
- you can fix this by placing your .so
file into target/<rust-triple>/<profile>/tools/libname.so
. The builder will pick the library up and put it in the final package.
Also, check out our ROADMAP for a better understanding of what we are doing right now and what planned.
This project is part of Web3 Foundation Grants Program.
Licensed under Apache-2.0 License.