After installing and building Fuchsia OS, I can modify the string in the example hello world program from "Hello, World!\n" to "Hello, Fuchsia!\n". Then I build and execute the code which produces the expected string "Hello, Fuchsia!" using:
cd fuchsia
fx set bringup.x64 --with //examples/hello_world
fx build; fx qemu
hello_world_cpp
This is fine for understanding how to change part of the Fuchsia "distribution". How do I create my own program outside of the fuchsia tree? I assume one would do normally this when creating program for running on Fuchsia OS so that one can manage the source cleanly.
Answer
The
third_partydirectory is meant for modules that are managed outside of the Fuchsia tree. In the top-level.gitignorethe directory is excluded (link):You can see that this folder is mostly empty in git (link). It is first populated during bootstrap (link), which internally uses
jiri updateto fetch repos specified in the integration manifest (e.g. forthird_party).You would maintain your module in a separate
gitrepo. For development, you would clone this repo into a sub-directory inthird-party. Because of the.gitignoreentry, it will not be tracked by the Fuchsiagit.Example
Files:
BUILD.gn:hello_world.cc:Build and run: