diff --git a/tfclient/BUILDING.md b/tfclient/BUILDING.md new file mode 100644 index 0000000..410347c --- /dev/null +++ b/tfclient/BUILDING.md @@ -0,0 +1,33 @@ +tfclient has a more involved build process than the rest of trifid due to the fact that it embeds the distribution nebula and nebula-cert binaries. + +## Clearing the Nebula binary cache + +Compiling tfclient may take longer than usual every once in a while because the build system downloads the latest version of nebula. +After this has been done once, the generated code will be cached in the target directory. If you want to redownload it (e.g. if Nebula is updated), you can: + +- run `cargo clean`, or +- delete `target/debug/build/tfclient-[HASH]/out/noredownload`, or +- set the environment variable `TFBUILD_FORCE_REDOWNLOAD=1` + +The 3rd option is the best, as it will not signifigantly increase compile times *or* need you to find the build hash. + +## Set a GitHub API key + +Since the build process involves making calls to the GitHub API, you may get ratelimited. +To provide a GitHub API token to increase your ratelimit, set `GH_API_KEY` to your GitHub API key. + +## Unsupported architecture :( + +If you're compiling on (or for) an architecture that tfclient currently does not support, you will get the following message: + +```text +[*] Compiling for target: SOME-TARGET-TRIPLET-HERE +This architecture is not supported yet :( +Nebula has a limited set of architectures it is able to function on. +tfclient can only be compiled on these architectures. +See https://github.com/slackhq/nebula/releases for a list of supported architectures. +Is your system supported by Nebula? Shoot a message to the mailing list. Include the target triplet (above) in your response, as well as a link to the functioning Nebula binary. We will happily add your machine to the list! +``` + +The `tfclient` build system attempts to check if your architecture is unsupported. It does this by checking your target triplet. +If this is a false alarm, and a build of nebula is available and fully functional on your machine, please shoot a message to the mailing list with your target triplet and a link to which build of nebula works on your machine. We will update the build script and update the repo!