在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):BrainiumLLC/cargo-mobile开源软件地址(OpenSource Url):https://github.com/BrainiumLLC/cargo-mobile开源编程语言(OpenSource Language):Rust 90.4%开源软件介绍(OpenSource Introduction):cargo-mobileThe answer to "how do I use Rust on iOS and Android?" cargo-mobile takes care of generating Xcode and Android Studio project files, building and running on device, generating project boilerplate, and a few other things! Check out the announcement post! StatusEverything here works and is already used internally! However, this hasn't seen a lot of external use yet, so there could still be some rough edges. Building for iOS is broken on Rust 1.46.0, 1.47.0, and 1.48.0! Sorry for the inconvenience! This is resolved in Rust 1.49.0, so please update to that if you haven't already: rustup update stable
rustup default stable InstallationThe build will probably take a bit, so feel free to go get a snack or something. cargo install --git https://github.com/BrainiumLLC/cargo-mobile cargo-mobile is currently supported on macOS and Linux. Note that it's not possible to target iOS on platforms other than macOS! You'll still get to target Android either way. A PR adding Windows support would be hugely appreciated! You'll need to have Xcode and the Android SDK/NDK installed. Some of this will ideally be automated in the future, or at least we'll provide a helpful guide and diagnostics. Whenever you want to update: cargo mobile update UsageTo start a new project, all you need to do is make a directory with a cute name, cargo mobile init After some straightforward prompts, you'll be asked to select a template pack. Template packs are used to generate project boilerplate, i.e. using the
Template pack contribution is encouraged; we'd love to have very nice template packs for Bevy, Amethyst, and whatever else people find helpful! We'll write up a guide for template pack creation soon, but in the mean time, the existing ones are a great reference point. Any template pack placed into Once you've generated your project, you can run If you prefer to work in the usual IDEs, you can use For more commands, run AndroidBuilding for Android is broken on NDK >= 23
By default, warn and error logs are displayed. Additional logging of increasing verbosity can be shown by use of the For fine-grained control of logging, use the If using the |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论