Skip to content

Commit cf0709f

Browse files
committed
Move platform-specific docs after example
1 parent bb2e7ba commit cf0709f

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,6 @@ Beware that big endian targets are much less tested, and may behave incorrectly.
6464

6565
Pull requests to add support for new platforms are welcome!
6666

67-
## WebAssembly
68-
69-
To run an example with the web backend, add the following to `.cargo/config.toml`:
70-
```toml
71-
[target.'cfg(target_family = "wasm")']
72-
runner = "wasm-server-runner"
73-
```
74-
75-
And then run:
76-
77-
```sh
78-
cargo install wasm-server-runner
79-
cargo run --target wasm32-unknown-unknown --example winit
80-
```
81-
82-
And open the link to view the result in the browser.
83-
84-
## Android
85-
86-
To run the Android-specific example on an Android phone: `cargo apk r --example winit_android` or `cargo apk r --example winit_multithread_android`.
87-
8867
## Example
8968

9069
```rust,no_run
@@ -215,6 +194,32 @@ impl ApplicationHandler for App {
215194
}
216195
```
217196

197+
## Test on WebAssembly
198+
199+
To run an example with the web backend, add the following to `.cargo/config.toml`:
200+
```toml
201+
[target.'cfg(target_family = "wasm")']
202+
runner = "wasm-server-runner"
203+
```
204+
205+
And then run:
206+
207+
```sh
208+
cargo install wasm-server-runner
209+
cargo run --target wasm32-unknown-unknown --example winit
210+
```
211+
212+
And open the link to view the result in the browser.
213+
214+
## Test on Android
215+
216+
To run the Android-specific example on an Android phone:
217+
```sh
218+
cargo apk r --example winit_android
219+
# or
220+
cargo apk r --example winit_multithread_android
221+
```
222+
218223
## MSRV Policy
219224

220225
This crate's Minimum Supported Rust Version (MSRV) is **1.71**. Changes to

0 commit comments

Comments
 (0)