make tun dependency optional (#142)

* remove log crates
* remove udp/raw of smoltcp
* make tun as optional dependancy, compile for freebsd works
This commit is contained in:
Sijie.Sun
2024-06-11 09:09:32 +08:00
committed by GitHub
parent 8aa57ebc22
commit 34f832bbad
26 changed files with 310 additions and 488 deletions
+3
View File
@@ -10,8 +10,11 @@ use super::PeerId;
pub enum Error {
#[error("io error")]
IOError(#[from] io::Error),
#[cfg(feature = "tun")]
#[error("rust tun error {0}")]
TunError(#[from] tun::Error),
#[error("tunnel error {0}")]
TunnelError(#[from] tunnel::TunnelError),
#[error("Peer has no conn, PeerId: {0}")]