Initialize Cargo workspace with wraith-core, wraith, and wraith-napi crates
- Workspace root Cargo.toml with three crate members - wraith-core: library with feature flags (tls, iroh, acme), core deps (russh, tokio, tracing, anyhow, thiserror, tokio-util), module skeleton (transport, client, server, auth, socks5, error) - wraith: binary crate depending on wraith-core with clap derive - wraith-napi: cdylib crate depending on wraith-core, napi, napi-derive - .gitignore for target/ and node_modules/
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
target/
|
||||||
|
node_modules/
|
||||||
5644
Cargo.lock
generated
Normal file
5644
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
7
Cargo.toml
Normal file
7
Cargo.toml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[workspace]
|
||||||
|
members = [
|
||||||
|
"crates/wraith-core",
|
||||||
|
"crates/wraith",
|
||||||
|
"crates/wraith-napi",
|
||||||
|
]
|
||||||
|
resolver = "2"
|
||||||
25
crates/wraith-core/Cargo.toml
Normal file
25
crates/wraith-core/Cargo.toml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
[package]
|
||||||
|
name = "wraith-core"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "wraith_core"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = []
|
||||||
|
tls = ["dep:tokio-rustls", "dep:rustls"]
|
||||||
|
iroh = ["dep:iroh"]
|
||||||
|
acme = ["dep:rustls-acme", "tls"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
russh = "0.49"
|
||||||
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
tracing = "0.1"
|
||||||
|
anyhow = "1"
|
||||||
|
thiserror = "2"
|
||||||
|
tokio-util = { version = "0.7", features = ["compat"] }
|
||||||
|
tokio-rustls = { version = "0.26", optional = true }
|
||||||
|
rustls = { version = "0.23", optional = true }
|
||||||
|
rustls-acme = { version = "0.12", optional = true }
|
||||||
|
iroh = { version = "0.34", optional = true }
|
||||||
0
crates/wraith-core/src/auth.rs
Normal file
0
crates/wraith-core/src/auth.rs
Normal file
0
crates/wraith-core/src/client.rs
Normal file
0
crates/wraith-core/src/client.rs
Normal file
0
crates/wraith-core/src/error.rs
Normal file
0
crates/wraith-core/src/error.rs
Normal file
6
crates/wraith-core/src/lib.rs
Normal file
6
crates/wraith-core/src/lib.rs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
pub mod transport;
|
||||||
|
pub mod client;
|
||||||
|
pub mod server;
|
||||||
|
pub mod auth;
|
||||||
|
pub mod socks5;
|
||||||
|
pub mod error;
|
||||||
0
crates/wraith-core/src/server.rs
Normal file
0
crates/wraith-core/src/server.rs
Normal file
0
crates/wraith-core/src/socks5.rs
Normal file
0
crates/wraith-core/src/socks5.rs
Normal file
0
crates/wraith-core/src/transport.rs
Normal file
0
crates/wraith-core/src/transport.rs
Normal file
12
crates/wraith-napi/Cargo.toml
Normal file
12
crates/wraith-napi/Cargo.toml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[package]
|
||||||
|
name = "wraith-napi"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
wraith-core = { path = "../wraith-core" }
|
||||||
|
napi = "3"
|
||||||
|
napi-derive = "3"
|
||||||
3
crates/wraith-napi/src/lib.rs
Normal file
3
crates/wraith-napi/src/lib.rs
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#[allow(unused_imports)]
|
||||||
|
#[macro_use]
|
||||||
|
extern crate napi_derive;
|
||||||
14
crates/wraith/Cargo.toml
Normal file
14
crates/wraith/Cargo.toml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[package]
|
||||||
|
name = "wraith"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "wraith"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
wraith-core = { path = "../wraith-core" }
|
||||||
|
clap = { version = "4", features = ["derive"] }
|
||||||
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
anyhow = "1"
|
||||||
1
crates/wraith/src/main.rs
Normal file
1
crates/wraith/src/main.rs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
fn main() {}
|
||||||
Reference in New Issue
Block a user