1 unstable release

0.1.0 Oct 7, 2020

#178 in Multimedia

37 downloads per month
Used in 2 crates (via tox)

GPL-3.0+

31KB
400 lines

Tox

Github 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.

Reference

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.

Contributions

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

Building

Fairly simple. First, install Rust >= 1.65 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

Goals

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

Progress

A fully working tox-node written in pure Rust with a DHT server and a TCP relay can be found here.

Right now we are working on the client part.

Authors

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!

License

Licensed under GPLv3+ with Apple app store exception.


lib.rs:

E.g.

use tox_encryptsave::*;

let plaintext = b"pls no encrypt";
let password = b"123456";

// to encrypt data
let encrypted = pass_encrypt(plaintext, password)
.expect("Failed to encrypt >.<\"");

// confirm that the data is encrypted
assert_ne!(plaintext, encrypted.as_slice());
assert!(is_encrypted(&encrypted));

// decrypted is same as plaintext
assert_eq!(plaintext,
pass_decrypt(&encrypted, password).unwrap().as_slice());

Dependencies

~17MB
~77K SLoC