Skip to content

Commit 58ee919

Browse files
committed
Migrate fuchsia docs from pm to ffx
The `pm` tool has been deprecated, so this migrates the fuchsia documentation to the new `ffx` based tooling.
1 parent 030a12c commit 58ee919

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

src/doc/rustc/src/platform-support/fuchsia.md

+11-14
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ meta/hello_fuchsia.cm=pkg/meta/hello_fuchsia.cm
387387
```
388388

389389
*Note: Relative manifest paths are resolved starting from the working directory
390-
of `pm`. Make sure to fill out `<SDK_PATH>` with the path to the downloaded
390+
of `ffx`. Make sure to fill out `<SDK_PATH>` with the path to the downloaded
391391
SDK.*
392392

393393
The `.manifest` file will be used to describe the contents of the package by
@@ -459,12 +459,10 @@ hello_fuchsia/
459459
Next, we'll build a package manifest as defined by our manifest:
460460

461461
```sh
462-
${SDK_PATH}/tools/${ARCH}/pm \
463-
-api-level $(${SDK_PATH}/tools/${ARCH}/ffx version -v | grep "api-level" | head -1 | awk -F ' ' '{print $2}') \
464-
-o pkg/hello_fuchsia_manifest \
465-
-m pkg/hello_fuchsia.manifest \
466-
build \
467-
-output-package-manifest pkg/hello_fuchsia_package_manifest
462+
${SDK_PATH}/tools/${ARCH}/ffx package build \
463+
--api-level $(${SDK_PATH}/tools/${ARCH}/ffx --machine json version | jq .tool_version.api_level) \
464+
--out pkg/hello_fuchsia_manifest \
465+
pkg/hello_fuchsia.manifest
468466
```
469467

470468
This will produce `pkg/hello_fuchsia_manifest/` which is a package manifest we can
@@ -498,8 +496,7 @@ to.
498496
We can set up our repository with:
499497

500498
```sh
501-
${SDK_PATH}/tools/${ARCH}/pm newrepo \
502-
-repo pkg/repo
499+
${SDK_PATH}/tools/${ARCH}/ffx repository create pkg/repo
503500
```
504501

505502
**Current directory structure**
@@ -523,17 +520,17 @@ hello_fuchsia/
523520
We can publish our new package to that repository with:
524521

525522
```sh
526-
${SDK_PATH}/tools/${ARCH}/pm publish \
527-
-repo pkg/repo \
528-
-lp -f <(echo "pkg/hello_fuchsia_package_manifest")
523+
${SDK_PATH}/tools/${ARCH}/ffx repository publish \
524+
--package pkg/hello_fuchsia_package_manifest \
525+
pkg/repo
529526
```
530527

531528
Then we can add the repository to `ffx`'s package server as `hello-fuchsia` using:
532529

533530
```sh
534531
${SDK_PATH}/tools/${ARCH}/ffx repository add-from-pm \
535-
pkg/repo \
536-
-r hello-fuchsia
532+
--repository hello-fuchsia \
533+
pkg/repo
537534
```
538535

539536
## Running a Fuchsia component on an emulator

0 commit comments

Comments
 (0)