#p2p #instant-messaging #networking #tox #toxcore


Implementation of toxcore in pure Rust - P2P, distributed, encrypted, easy to use DHT-based network

8 releases

0.0.8 Dec 27, 2018
0.0.7 Oct 27, 2018
0.0.6 Sep 7, 2018
0.0.5 Jun 27, 2018
0.0.1 Dec 31, 2014

#31 in Multimedia

Download history 7/week @ 2018-10-23 37/week @ 2018-10-30 96/week @ 2018-11-06 40/week @ 2018-11-13 22/week @ 2018-11-20 16/week @ 2018-11-27 43/week @ 2018-12-04 4/week @ 2018-12-11 9/week @ 2018-12-18 21/week @ 2018-12-25 65/week @ 2019-01-01 38/week @ 2019-01-08 14/week @ 2019-01-15

147 downloads per month
Used in 1 crate


20K SLoC


Travis Build Status Appveyor Build Status Coverage Status Docs Current Crates.io Version Join Gitter

This library is an implementation of toxcore in Rust - P2P, distributed, encrypted, easy to use DHT-based network.


The Tox Reference should be used for implementing toxcore in Rust. Reference source repository.

If existing documentation appears to not be complete, or is not clear enough, issue / pull request should be filled on the reference repository.


...are welcome. 😄 For details, look at CONTRIBUTING.md.


Fairly simple. First, install Rust >= 1.31.0 and a C compiler (Build Tools for Visual Studio on Windows, GCC or Clang on other platforms).

Then you can build the debug version with

cargo build

To run tests, use:

cargo test

To build docs and open them in your browser:

cargo doc --open

With clippy

To check for clippy warnings (linting), you need nightly Rust with clippy-preview component.

To check:

cargo clippy --all

To check with tests:

cargo clippy --all --tests


  • improved toxcore implementation in Rust
  • Rust API
  • documentation
  • tests
  • more


Not listed items are on TODO. If you're interested in them arriving sooner, consider helping 😉

  • implementing toxcore

    • DHT Node
      • ping requests & responses
      • nodes requests & responses
      • CookieRequest
      • CookieResponse
      • CryptoHandshake
      • CryptoData
      • LanDiscovery
      • OnionRequest[0,1,2]
      • OnionResponse[3,2,1]
      • OnionAnnounceRequest & OnionDataRequest
      • OnionAnnounceResponse & OnionDataResponse (need onion client)
      • BootstrapInfo
      • NAT ping requests & responses
    • TCP Relay
      • Handshake
      • RouteRequest
      • RouteResponse
      • ConnectNotification
      • DisconnectNotification
      • PingRequest
      • PongResponse
      • OobSend
      • OobReceive
      • OnionRequest
      • OnionResponse
      • Data
    • toxencryptsave (aka TES)
  • Rust API

    It will be a subject to changes, and most likely parts that are currently public will at later point become hidden. That though depends on the needs.

  • Documentation

    • Simply great. Further improvements in progress.
  • tests

    • tests cover almost all functionality


zetox was created by Zetok Zalbavar (zetok/openmailbox/org) and assimilated by the tox-rs team.

tox-rs has contributions from many users. See AUTHORS.md. Thanks everyone!

tox-rs is sponsored by Zerho LLC.


Dual licensed under the MIT or GPLv3+ licenses. You may use this project under the terms of either the MIT License or the GNU General Public License (GPL) Version 3+.

For details, see LICENSE-MIT and LICENSE-GPL.


~79K SLoC