Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving Fuchsia rustc support documentation #100637

Merged
merged 1 commit into from
Aug 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -127,7 +127,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 @@ -238,10 +241,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 @@ -259,6 +269,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