Skip to main content

emissary_core/
lib.rs

1// Permission is hereby granted, free of charge, to any person obtaining a
2// copy of this software and associated documentation files (the "Software"),
3// to deal in the Software without restriction, including without limitation
4// the rights to use, copy, modify, merge, publish, distribute, sublicense,
5// and/or sell copies of the Software, and to permit persons to whom the
6// Software is furnished to do so, subject to the following conditions:
7//
8// The above copyright notice and this permission notice shall be included in
9// all copies or substantial portions of the Software.
10//
11// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
16// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
17// DEALINGS IN THE SOFTWARE.
18
19#![cfg_attr(not(any(test, feature = "std")), no_std)]
20#![cfg_attr(test, allow(clippy::all))]
21#![allow(clippy::wrong_self_convention)]
22#![allow(clippy::manual_async_fn)]
23#![allow(clippy::type_complexity)]
24#![allow(clippy::enum_variant_names)]
25#![allow(clippy::too_many_arguments)]
26#![allow(clippy::assign_op_pattern)]
27#![allow(clippy::new_ret_no_self)]
28#![allow(clippy::module_inception)]
29#![allow(clippy::option_map_unit_fn)]
30#![allow(clippy::manual_div_ceil)]
31#![allow(clippy::should_implement_trait)]
32#![allow(deprecated)]
33
34extern crate alloc;
35
36pub type Result<T> = core::result::Result<T, Error>;
37
38pub use config::{
39    BandwidthConfig, Config, ExploratoryConfig, I2cpConfig, MetricsConfig, Ntcp2Config, SamConfig,
40    Ssu2Config, TransitConfig,
41};
42pub use error::Error;
43pub use profile::Profile;
44
45#[cfg(feature = "fuzz")]
46pub use {
47    i2cp::{Message, MessageType},
48    sam::{Datagram, Packet, SamCommand},
49    transport::{Block, HeaderReader, MessageBlock},
50};
51
52mod bloom;
53mod config;
54mod constants;
55mod destination;
56mod error;
57mod i2cp;
58mod netdb;
59mod profile;
60mod sam;
61mod shutdown;
62mod subsystem;
63mod transport;
64mod tunnel;
65mod util;
66
67pub mod crypto;
68pub mod events;
69pub mod i2np;
70pub mod primitives;
71pub mod protocol;
72pub mod router;
73pub mod runtime;