Skip to content

Commit

Permalink
readme: Use console code blocks for shell commands (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 authored Nov 24, 2021
1 parent 63cbffa commit 6e76587
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@ fn main() {
```

Install `cargo apk` for building, running and debugging your application:
```sh
cargo install cargo-apk
```console
$ cargo install cargo-apk
```

We can now directly execute our `Hello World` application on a real connected device or an emulator:
```sh
cargo apk run
```console
$ cargo apk run
```

## Logging and stdout
Stdout is redirected to the android log api when using `ndk-glue`. Any logger that logs to
stdout, like `println!`, should therefore work.

Use can filter the output in logcat
```
adb logcat RustStdoutStderr:D *:S
```console
$ adb logcat RustStdoutStderr:D *:S
```

### Android logger
Expand Down
8 changes: 4 additions & 4 deletions cargo-apk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Tool for creating Android packages.
## Installation

From crates.io:
```
cargo install cargo-apk
```console
$ cargo install cargo-apk
```

From source:
```
cargo install --path .
```console
$ cargo install --path .
```

## Commands
Expand Down
12 changes: 6 additions & 6 deletions ndk-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ Collection of examples showing different parts of the libraries.
## Examples

In order to see logs of the sample apps execute in a console:
```
adb logcat RustStdoutStderr:D '*:S'
```console
$ adb logcat RustStdoutStderr:D '*:S'
```

### hello_world

Prints `hello world` in the console

```
cargo apk build --example hello_world
```console
$ cargo apk build --example hello_world
```

### jni_audio

Prints output audio devices in the console

```
cargo apk run --example jni_audio
```console
$ cargo apk run --example jni_audio
```

0 comments on commit 6e76587

Please sign in to comment.