From a73afe3b7ec292366d116c4449377020c5066e6a Mon Sep 17 00:00:00 2001 From: Andrew Pollack Date: Tue, 16 Aug 2022 15:56:38 +0000 Subject: [PATCH] Improving Fuchsia rustc support documentation Improving wording --- src/doc/rustc/src/platform-support/fuchsia.md | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/doc/rustc/src/platform-support/fuchsia.md b/src/doc/rustc/src/platform-support/fuchsia.md index 61bd1b425bc..f51ccfdafee 100644 --- a/src/doc/rustc/src/platform-support/fuchsia.md +++ b/src/doc/rustc/src/platform-support/fuchsia.md @@ -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 @@ -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: @@ -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