Skip to content

Commit

Permalink
Rollup merge of rust-lang#100637 - andrewpollack:fuchsia-docs-adjustm…
Browse files Browse the repository at this point in the history
…ents, r=tmandry

Improving Fuchsia rustc support documentation

* Adjusting `package/meta/package` to fit current schema
* Adding repository server step
* Adjusting step to give default repository
* Adding "recreate" step for easier step following
  • Loading branch information
matthiaskrgr committed Aug 17, 2022
2 parents 8283b36 + a73afe3 commit a003ad6
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/doc/rustc/src/platform-support/fuchsia.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ following files inside:

**`package/meta/package`**
```json
{"name":"hello_fuchsia","version":0}
{
"name": "hello_fuchsia",
"version": "0"
}
```

The `package` file describes our package's name and version number. Every
Expand Down Expand Up @@ -232,10 +235,17 @@ ${SDK_PATH}/tools/${ARCH}/ffx product-bundle get workstation_eng.qemu-${ARCH}
${SDK_PATH}/tools/${ARCH}/ffx emu start workstation_eng.qemu-${ARCH} --headless
```

Then, once the emulator has been started:
Once the emulator is running, start a package repository server to serve our
package to the emulator:

```sh
${SDK_PATH}/tools/${ARCH}/ffx target repository register
${SDK_PATH}/tools/${ARCH}/ffx repository server start
```

Once the repository server is up and running, register our repository:

```sh
${SDK_PATH}/tools/${ARCH}/ffx target repository register --repository hello-fuchsia
```

And watch the logs from the emulator in a separate terminal:
Expand All @@ -253,6 +263,10 @@ ${SDK_PATH}/tools/${ARCH}/ffx component run fuchsia-pkg://hello-fuchsia/hello_fu
On reruns of the component, the `--recreate` argument may also need to be
passed.

```sh
${SDK_PATH}/tools/${ARCH}/ffx component run --recreate fuchsia-pkg://hello-fuchsia/hello_fuchsia#meta/hello_fuchsia.cm
```

## Testing

### Running unit tests
Expand Down

0 comments on commit a003ad6

Please sign in to comment.