Building from source code
Teleghosts code distribution is done via the radicle forge - a decentralized git network. You can obtain code in 2 ways:
- By installing
radicleand synchronizing the repository state from the network - By using
git clonedirectly on one of the radicle seeds.
Get code from Radicle
Obtaining the code from radicle has the following benefits:
- you’ll get the latest repo state
- you’ll be able to make contributions
- by keeping your radicle node online you’ll help with code redistribution
Follow the radicle user guide to learn about
radicle and get your node up and running. In short, you need to execute the
following commands after installing the rad CLI.
rad node start
rad clone rad://z42LWUvgeuP6aUzykjWh2bSF9Sh6NIt takes a few minutes to discover peers after the rad node start so don’t
expect rad clone to work immediately. After the rad clone you can fetch
updates using regular git fetch/git pull commands.
If you plan to self-host teleghosts on the server you can help the project by
keeping the radicle node with our repo online.
Get code with git clone
If you don’t want to bother with radicle you can still get the code directly
from one of the radicle seeds.
git clone https://iris.radicle.xyz/z42LWUvgeuP6aUzykjWh2bSF9Sh6N.git TeleghostsIt is not guaranteed that you’ll get the latest repo state this way so if
you’re not seeing the latest release commit immediately after clone try to
git fetch/git pull in a few hours.
By using the git directly you won’t be able to make contributions to the project.
Building the release binary
For convenience and build reproducibility we provide a podman configuration to
build teleghosts. Install podman in rootless mode and execute
dist-build.sh from one of the teleghosts annotated tags to get a build with
SHA256-sums matching sums on the Releases page.
cd podman/
./dist-build.shYou can play with EXTRA_CARGO_FLAGS variable defined in podman/build-config
to modify build features(e.g. repace features with --features no_logs to
disalbe all logging on the instance). The full list of features with their
descriptions can be found at the end of the page.
Dev setup
Starting from alpha.3 the dev setup is quite complicated, consult the
README.md in the repo to setup your dev environment.
After the environment is ready you can cargo build teleghosts with the
following features(pass --features <feature1>,<feature2>... flag to cargo)
backtraces: ensures backtraces are available in the logs and attaches backtraces to all errorsdev_secrets: streamlines theteleghostslaunch process for development purposes reading secrets fromdev_secrets.rsmodule. You can figure out the contents of this module from compile errors.temp_db: the bridge database will always be created in memory and not on disk. This is mainly useful for manual testing.logger: enables structured on-disk logging. Logs are saved into./logs/current.logand./logs/previous.log. Without this feature all logs are printed tostdout/stderrno_logs: alllogcalls will be compiled out