Create a `lib` dir for subcrates (#97)
As we extract subcrates from the `src/` directory, the repository root becomes a bit cluttered. This change moves these subcrates into a `lib` directory.
This commit is contained in:
parent
53a85f442a
commit
a4d4110776
18
Cargo.toml
18
Cargo.toml
|
@ -1,10 +1,10 @@
|
|||
[workspace]
|
||||
members = [
|
||||
".",
|
||||
"futures-mpsc-lossy",
|
||||
"metrics",
|
||||
"router",
|
||||
"timeout",
|
||||
"lib/futures-mpsc-lossy",
|
||||
"lib/metrics",
|
||||
"lib/router",
|
||||
"lib/timeout",
|
||||
]
|
||||
|
||||
[package]
|
||||
|
@ -19,10 +19,10 @@ default = ["flaky_tests"]
|
|||
flaky_tests = []
|
||||
|
||||
[dependencies]
|
||||
futures-mpsc-lossy = { path = "./futures-mpsc-lossy" }
|
||||
linkerd2-metrics = { path = "./metrics" }
|
||||
linkerd2-proxy-router = { path = "./router" }
|
||||
linkerd2-timeout = { path = "./timeout" }
|
||||
futures-mpsc-lossy = { path = "lib/futures-mpsc-lossy" }
|
||||
linkerd2-metrics = { path = "lib/metrics" }
|
||||
linkerd2-proxy-router = { path = "lib/router" }
|
||||
linkerd2-timeout = { path = "lib/timeout" }
|
||||
|
||||
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.1", version = "0.1.1" }
|
||||
|
||||
|
@ -80,7 +80,7 @@ procinfo = "0.4.2"
|
|||
[dev-dependencies]
|
||||
net2 = "0.2"
|
||||
quickcheck = { version = "0.6", default-features = false }
|
||||
linkerd2-metrics = { path = "./metrics", features = ["test_util"] }
|
||||
linkerd2-metrics = { path = "./lib/metrics", features = ["test_util"] }
|
||||
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", tag = "v0.1.1", version = "0.1.1", features = ["arbitrary"] }
|
||||
flate2 = { version = "1.0.1", default-features = false, features = ["rust_backend"] }
|
||||
# `tokio-io` is needed for TCP tests, because `tokio::io` doesn't re-export
|
||||
|
|
17
Dockerfile
17
Dockerfile
|
@ -19,21 +19,18 @@ WORKDIR /usr/src/linkerd2-proxy
|
|||
#
|
||||
# Mock out all local code and fetch external dependencies to ensure that
|
||||
# external sources are primarily cached on Cargo.lock.
|
||||
RUN for d in . futures-mpsc-lossy router metrics timeout ; \
|
||||
RUN for d in . lib/futures-mpsc-lossy lib/router lib/metrics lib/timeout ; \
|
||||
do mkdir -p "${d}/src" && touch "${d}/src/lib.rs" ; \
|
||||
done
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY futures-mpsc-lossy/Cargo.toml futures-mpsc-lossy/Cargo.toml
|
||||
COPY metrics/Cargo.toml metrics/Cargo.toml
|
||||
COPY router/Cargo.toml router/Cargo.toml
|
||||
COPY timeout/Cargo.toml timeout/Cargo.toml
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY lib/futures-mpsc-lossy/Cargo.toml lib/futures-mpsc-lossy/Cargo.toml
|
||||
COPY lib/metrics/Cargo.toml lib/metrics/Cargo.toml
|
||||
COPY lib/router/Cargo.toml lib/router/Cargo.toml
|
||||
COPY lib/timeout/Cargo.toml lib/timeout/Cargo.toml
|
||||
RUN cargo fetch --locked
|
||||
|
||||
# Build libraries, leaving the proxy mocked out.
|
||||
COPY futures-mpsc-lossy futures-mpsc-lossy
|
||||
COPY router router
|
||||
COPY metrics metrics
|
||||
COPY timeout timeout
|
||||
COPY lib lib
|
||||
ARG PROXY_UNOPTIMIZED
|
||||
RUN if [ -n "$PROXY_UNOPTIMIZED" ]; \
|
||||
then cargo build --frozen ; \
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
name = "linkerd2-timeout"
|
||||
version = "0.1.0"
|
||||
authors = ["Oliver Gould <ver@buoyant.io>"]
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
futures = "0.1"
|
Loading…
Reference in New Issue