Rust Cross-Platform toolkit for games — Crossbow announcement

DodoRare
DodoRare
3 min readAug 25, 2022

--

Crossbow Splash

Hello Rust lovers! Today our open-source team is happy to announce Crossbow — Cross-Platform build tools and toolkit for games and game engines written in Rust!

What is it?

The crossbow the project aims to provide a complete toolkit for cross-platform game development in Rust - from project creation to publishing. In addition, the project simplifies the creation, packaging, and signing of Android and iOS applications. All our tools are game engine agnostic — so it will not be a big problem for rust game developers to integrate them into their engines or games!

Why do we build it?

There are already cargo-apk, cargo-mobile, cargo-xcode, etc. — why do I need another packaging tool?

Project crossbow is not only a packaging tool for Android and iOS - it's a cross-platform build tools, plugins, and toolkit for Rust! With crossbundle you can create native .apk/.aab without any Java or setup Gradle project with fancy Crossbow Android plugins (iOS in the near future); with crossbundle-tools you can customize and create new commands; with crossbow-android you can write your own Android plugins in Java/Kotlin!

A lot of functionality was inspired by Godot, Xamarin, cargo-apk, and some hard-to-find articles on the internet regarding .app/.ipa generation without XCode ;).

If you want to jump straight to the docs and code examples — here are some links:

Crossbow parts and crates

Crossbow toolkit consists of different parts and crates:

  1. First one is crossbundle — a tool to create, build, run, and sign your game! It supports Macroquad engines and games that are made with ndk-glue wrappers. Also, it can build app/ipa or apk/aab files for your iOS and Android apps!
    https://crossbow.dodorare.com/crossbundle/command-build.html
  2. One of the best features of Crossbow is Plugins! Now with the latest version of Crossbow, you can create and use custom Java/Kotlin plugins!
    https://crossbow.dodorare.com/crossbow/android-plugins.html
  3. Single cross-platform permission API that works with iOS and Android applications! Just like in Xamarin! Check this out! https://crossbow.dodorare.com/crossbow/permissions.html
  4. Simplified installation of necessary commands and sdk with crossbundle install — now it’s unnecessary to install Android Studio, you can setup most of the tools from the command line interface!
    https://crossbow.dodorare.com/install/index.html
  5. Docker image that contains everything needed to build a working Android application!
    https://crossbow.dodorare.com/install/docker.html

Working plugins

Currently, available only 4 plugins:

  1. Android AdMob
    https://github.com/dodorare/crossbow/tree/main/plugins/admob-android
  2. Google Play Games Services
    https://github.com/dodorare/crossbow/tree/main/plugins/play-games-services
  3. Google Play Core
    https://github.com/dodorare/crossbow/tree/main/plugins/play-core
  4. Google Play Billing
    https://github.com/dodorare/crossbow/tree/main/plugins/play-billing

If you want to create your own Android Java/Kotlin plugin for Crossbow — see the following link: https://crossbow.dodorare.com/crossbow/android-plugins.html.

Showcase with Crossbow plugins

Also, check out our showcase example that implements Billing, In-app updates, and Google Sign-in!

Showcase Screenshots

Check its codebase to learn how it actually works from the code!

Future work

A lot has done, but even more, has to be done! This is only the beginning of the first-class support of Rust Cross-platform games, so sit tight! Our nearest next steps will be more focused on improving the quality of the codebase, and the next big goal is to add iOS plugin support alongside better xcodeproj generation!

Special thanks

Also, this project was initially funded by Web3 Foundation Grants Program. Big shout-out to them!

--

--