From 45ce30b8cb300977cdd716f9b46f34fec57e3e69 Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Mon, 20 Mar 2023 13:53:58 -0400 Subject: [PATCH] add BUILDING.md documentation --- tfclient/BUILDING.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tfclient/BUILDING.md 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!