Updated: March 2021
|amberctl||Deprecated CLI for various components. Scheduled to be replaced by ||Go|
|pkg-cache||Caches downloaded packages in case they are needed again.||Rust|
|pkg-resolver||Main entry point for software delivery stack. Coordinates retrieval and installation of packages.||Rust|
|omaha-client||Checks for system updates using the Omaha server infrastructure||Rust|
|pkgctl||CLI for pkg-resolver||Rust|
|pkgfs||A filesystem for interacting with packages that are stored on a host.||Go|
|system-ota-test||An end-to-end test of system over the air updates.||Go|
|system-update-checker||Does what it says on the tin, checks for system updates!||Rust|
|system-updater-committer||Component responsible for committing the update.||Rust|
|system-updater||Actually performs system updates.||Rust|
strace, but for every IPC on the system, not just syscalls.
zxdb: Fuchsia’s debugger. Similar usage to
gdb, and has Unicode support (emoji!). Doesn’t currently work well with golang, but works fine with Rust.
VS Code seems to work pretty well. Follow the instructions here, including any language-specific instructions you find relevant; the Rust instructions are a good place to start.
Use the style guide appropriate for the language you’re in. The SWD stack is mostly in Rust and Go, which have strong opinions about style. All commits in those languages should be formatted with
gofmt respectively, and most editors/IDEs have a mode in which you can run those commands when you save a file. Do so!
Read the Fuchsia Getting Started guide first
Most of the SWD stack is in the
base image of fuchsia, so to get a swd stack working with tests, your build configuration is quite simple:
Tab 1 > fx set core.x64 --with //bundles:tests && fx build && fx serve Tab 2 > fx qemu -kN Tab 3 > fx test pkg-resolver-integration-tests # example of running the pkg-resolver integration tests
For further info on fx workflows: https://fuchsia.dev/fuchsia-src/development/workflows/fx
If you’ve successfully run the above, you have a working Fuchsia system with the software delivery stack working.
You can discover more tests with by running
fx list-packages on the host.
To update the base of your fuchsia image, you can use
fx ota if you’re running on hardware which supports OTA. If you’re running under QEMU, you’ll need to just restart QEMU to get an updated base after a rebuild. Don’t worry, it’s fast.
You’ll need to update that dependency’s vendored repository in //third_party. See the Rust documentation for examples.
The package resolver is configured by default to resolve
fuchsia.com to the local development host. To run a component in a package you’ve built locally, you can run something like
fx shell run fuchsia-pkg://fuchsia.com/<package_name>#meta/<component_name>.cmx
TODO(wittrock): is there a global package repository we can use as a repo for this example?
See the instructions on running a package repository with pm