1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-06 06:27:53 +02:00
Files
comprehensive-rust/src/android/build-rules/binary.md

24 lines
388 B
Markdown
Raw Normal View History

2022-12-21 16:36:30 +01:00
# Rust Binaries
Let us start with a simple application. At the root of an AOSP checkout, create
the following files:
_hello_rust/Android.bp_:
```javascript
{{#include binary/Android.bp}}
```
_hello_rust/src/main.rs_:
```rust
{{#include binary/src/main.rs:main}}
```
You can now build, push, and run the binary:
```shell
{{#include ../build_all.sh:hello_rust}}
Hello from Rust!
```