How to contribute
We welcome new contributors! You can get in contact with us on our gitlab instance, or on the #tor-dev IRC channel on OFTC.
Make sure to familiarize yourself with our Code of Conduct.
The new-account process on our gitlab instance is moderated, to reduce spam and abuse. Request an account to gain access to contribute.
Licensing notice
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Getting started
You might want to begin by looking around the codebase, or getting to know our architecture.
Finding something to work on
- More tests would always be great. You can look at the coverage reports to find out what parts need the more love.
- Parsing more Tor document types would be neat.
- More documentation examples would be great.
- Improvements or bugfixes to the existing code would be great.
- Improving the look and feel of the documentation would also rock.
We make notes throughout the document in comments with strings like "FIXME" or "TODO". Sometimes these can sound deceptively simple; keep in mind that usually there's a reason that someone wrote the comment instead of just doing the task. See "Before you start coding", below.
When we have TODOs that we want to fix prior to the release of a particular feature or milestone, we define a special TODO format. Right now, we have "TODO HS" (or "TODO hs") for things we intend to fix before we release support for Tor Hidden Services (.onion services).
If you want to make a temporary change that should not to be merged, mark it with XXXX. This will be spotted by the CI, preventing a mistaken merge.
We have provided a list of features that we wish other crates had in a file called WANT_FROM_OTHER_CRATES, so that you can find a place to contribute even if you don't want to write new code.
Finally, check out the bugtracker. There are some tickets there labeled as "First Contribution". That label means that we think they might be a good place to start out.
Before you start coding
For all but the most trivial of changes, it's best to get in touch with the development team before beginning work, to ensure that there's agreement about what you plan to do and how, and to avoid having multiple people try to work on the same thing at once.
If there's already an issue filed for the work, you can comment on the issue to verify whether this is a good issue to work on, and to get a go-ahead for your design and development plan. Often a sentence or two is sufficient, at least to start the conversation: "I'll rename X to Y"; "I'll prevent this function from retrying a download indefinitely by adding a limit of X retries, overridable by a config file option Y".
If there's not already an issue filed, you can file an issue yourself, though before doing that you may want to touch base with the developers on the #tor-dev IRC channel to double-check that one doesn't already exist.
Setting up your Development Environment
The following section is not an exhaustive guide, and only covers common setup and development tasks.
Install build dependencies
You'll need to have a working Rust environment to build the code, and a working Git installation to fetch the code. Additionally, please install the SQLite 3 development files and shellcheck to successfully run git hooks.
-
Rust note, for Windows devices check the Other Installation Methods
-
Git note, for Linux, macOS, and some Unix-like devices Git may be available via a package manager;
apt,brew,yum,pacman, etc. Git needs to be compiled with PCRE support to allow the use ofgit grep -Pin the git hooks. PCRE support is the default in some packages, but if you compile from source setUSE_LIBPCRE=YesPleasewhen runningmakeor-with-libpcrewhen running./configure. -
SQLite 3 development files (e.g. available via
apt install libsqlite3-dev) -
For git hooks: shellcheck used in
maint/shellcheck_all
(Optional) install development dependencies
TL;DR: ./maint/check-env
If you plan to run scripts inside the maint/ directory, that are scripts such as coverage reports, you'll need a few more dependencies. For this, please execute ./maint/check-env, which will check your host machine if all required dependencies are satisfied. If this is not the case, it will report the missing ones. Keep in mind that this list is pretty comprehensive and not every script requires all of these dependencies.
Clone the source code
In order to get a copy of the latest version of the arti source code:
$ git clone https://gitlab.torproject.org/tpo/core/arti.git
This will create a new git checkout in a directory called arti.
Update the source code
To get the latest updates, you can run:
$ git pull origin main
Note, if you're working on a local git branch it may be wise to use fetch and merge options instead
$ git fetch origin
$ git merge origin/mainPlease see a good Git tutorial for more information