Skip to content

Commit

Permalink
Move ww_net, ww_proc, and ww_rpc to lib
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelsr committed Aug 13, 2024
1 parent bb12a88 commit 434843d
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 19 deletions.
10 changes: 4 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace]
members = ["ww_net", "ww_proc", "ww_rpc"]
members = ["lib/net", "lib/proc"]

[dependencies]
anyhow = "1"
Expand All @@ -15,10 +15,8 @@ futures = "0.3.29"
ipfs-api-backend-hyper = "0.6"
libp2p = { version = "0.53.2", features = ["full"] }
rand = "0.8"
tokio = { version = "1.36", features = ["full"] }
tokio = { version = "1.x", features = ["full"] }
tracing = "0.1.37"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
wasmer = "4.3.5"
wasmer-wasix = "0.25.0"
ww_net = { path = "ww_net" }
ww_proc = { path = "ww_proc" }
net = { path = "lib/net" }
proc = { path = "lib/proc" }
2 changes: 1 addition & 1 deletion ww_net/Cargo.toml → lib/net/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ww_net"
name = "net"
version = "0.1.0"
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion ww_net/src/lib.rs → lib/net/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl DerefMut for DefaultSwarm {
}
}

impl net::Dialer for DefaultSwarm {
impl netx::Dialer for DefaultSwarm {
// Forward the call to the inner Swarm.
fn dial(&mut self, opts: swarm::dial_opts::DialOpts) -> Result<(), swarm::DialError> {
self.0.dial(opts)
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions ww_proc/Cargo.toml → lib/proc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ww_proc"
name = "proc"
version = "0.1.0"
edition = "2021"

Expand All @@ -11,6 +11,6 @@ uuid = { version = "1.10.0", features = [
"fast-rng", # Use a faster (but still sufficiently random) RNG
"macro-diagnostics", # Enable better diagnostics for compile-time UUIDs
] }
wasmer = "4.3.5"
wasmer-wasix = "0.25.0"
wasmer = { version = "4.x" }
wasmer-wasix = { version = "0.24" }
tracing = "0.1.37"
File renamed without changes.
12 changes: 6 additions & 6 deletions ww_rpc/Cargo.toml → lib/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ww_rpc"
name = "rpc"
version = "0.1.0"
edition = "2021"

Expand All @@ -12,11 +12,11 @@ capnpc = "0.19.0"

[dependencies]
anyhow = "1"
wasmer = "4.2.8"
wasmer-compiler-cranelift = "4.2.8"
wasmer-middlewares = "4.2.8"
wasmer = "4.x"
# wasmer-compiler-cranelift = "4.2.8"
# wasmer-middlewares = "4.2.8"
futures = "0.3.0"
tokio = { version = "1.0.0", features = ["net", "rt", "macros"] }
tokio-util = { version = "0.7.4", features = ["compat"] }
# tokio = { version = "1.36", features = ["net", "rt", "macros"] }
# tokio-util = { version = "0.7.4", features = ["compat"] }
capnp = "0.19.3"
capnp-rpc = "0.19.0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::{error::Error, time::Duration};
use anyhow::Result;
use futures::TryStreamExt;
use libp2p::{identify, kad, mdns, noise, ping, swarm, tcp, yamux};
use net::{self, net, DefaultBehaviour, DefaultBehaviourEvent, DefaultSwarm, IpfsC};
use proc::{self, WasmRuntime};
use tracing_subscriber::EnvFilter;
use ww_net::{self, net, DefaultBehaviour, DefaultBehaviourEvent, DefaultSwarm, IpfsC};
use ww_proc::{self, WasmRuntime};

pub mod cfg;

Expand Down

0 comments on commit 434843d

Please # to comment.