#transport #packet #key #fail #debug #easier #unsigned

mesher

A library to make anonymized mesh networking easier

3 releases (breaking)

0.8.0 Mar 31, 2020
0.1.0 Mar 25, 2020
0.0.1 Dec 27, 2019

#15 in #fail

BSD-3-Clause-Clear

33KB
544 lines

For information on the concepts underlying this library, see the project repo's README. The rest of this API documentation assumes you've read and understood it, and won't explain them. The README is also available at the root of the repo, as is standard.

The mesher API is fairly simple, and based around three pieces, which reflect the concepts described in the README:

  • struct Mesher coordinates the rest of the objects, e.g. managing Transports, automatically handling bounces, etc.
  • trait Transport defines the interface that Mesher uses to control Transports. If you need them, e.g. for testing, there are debug transports available in mesher::debug_transports.
  • struct Packet makes building signed and unsigned packets easier.

Also worth mentioning are the types in mesher::crypto, which encapsulate the manipulation of crypto primitives. You'll use them to pass keys into Mesher and Packet. They do offer secure keygen, but this crate will not handle storing keys for you, if you need that.

struct Message represents a message received.

There is, of course, a fail module, with the expected enum MesherFail and type Result for this crate's error handling. Re-exports all the commonly used parts for slightly more ergonomic use, at the expense of cluttering up the global namespace. Usage:

use mesher::prelude::*;

Dependencies

~18MB
~91K SLoC