From 948388b019b28da4f109120b1fb9696fb1e0e63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Fri, 15 Oct 2021 14:27:17 +1300 Subject: [PATCH] Reduce featureset of dependencies (tokio,git2) --- Cargo.lock | 44 +++++++++++++------------------------------- cli/Cargo.toml | 17 ++++++++++++++++- lib/Cargo.toml | 19 +++++++++++++++++-- 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a8a8d20..30d5643 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -731,8 +731,6 @@ dependencies = [ "libc", "libgit2-sys", "log", - "openssl-probe", - "openssl-sys", "url", ] @@ -1047,24 +1045,17 @@ checksum = "ddbd6021eef06fb289a8f54b3c2acfdd85ff2a585dfbb24b8576325373d2152c" dependencies = [ "cc", "libc", - "libssh2-sys", "libz-sys", - "openssl-sys", "pkg-config", ] [[package]] -name = "libssh2-sys" -version = "0.2.21" +name = "libmimalloc-sys" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0186af0d8f171ae6b9c4c90ec51898bad5d08a2d5e470903a50d9ad8959cbee" +checksum = "1d1b8479c593dba88c2741fc50b92e13dbabbbe0bd504d979f244ccc1a5b1c01" dependencies = [ "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", ] [[package]] @@ -1184,6 +1175,15 @@ dependencies = [ "syn 1.0.77", ] +[[package]] +name = "mimalloc" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb74897ce508e6c49156fd1476fc5922cbc6e75183c65e399c765a09122e5130" +dependencies = [ + "libmimalloc-sys", +] + [[package]] name = "minimal-lexical" version = "0.1.3" @@ -1412,25 +1412,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" -[[package]] -name = "openssl-probe" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" - -[[package]] -name = "openssl-sys" -version = "0.9.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69df2d8dfc6ce3aaf44b40dec6f487d5a886516cf6879c49e98e0710f310a058" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "owo-colors" version = "2.1.0" @@ -2694,6 +2675,7 @@ dependencies = [ "embed-resource", "insta", "miette", + "mimalloc", "notify-rust", "tokio", "tracing", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index d949a7b..525f466 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -24,7 +24,6 @@ console-subscriber = { git = "https://github.com/tokio-rs/console", optional = t dunce = "1.0.2" miette = { version = "3.2.0", features = ["fancy"] } notify-rust = "4.5.2" -tokio = { version = "1.10.0", features = ["full"] } tracing = "0.1.26" tracing-subscriber = "0.2.24" watchexec = { path = "../lib" } @@ -34,6 +33,22 @@ version = "2.33.3" default-features = false features = ["wrap_help"] +[dependencies.tokio] +version = "1.10.0" +features = [ # TODO: test which of these are actually needed + "fs", + "io-util", + "io-std", + "macros", + "parking_lot", + "process", + "rt", + "rt-multi-thread", + "signal", + "sync", + "time", +] + [build-dependencies] embed-resource = "1.6.1" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index fa727f2..33d3c5a 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -21,7 +21,6 @@ atomic-take = "1.0.0" clearscreen = "1.0.6" dunce = "1.0.2" futures = "0.3.16" -git2 = "0.13.22" globset = "0.4.8" ignore = "0.4.18" miette = "3.2.0" @@ -37,9 +36,25 @@ unicase = "2.6.0" version = "1.0.5" features = ["with-tokio"] +[dependencies.git2] +version = "0.13.22" +default-features = false + [dependencies.tokio] version = "1.10.0" -features = ["full"] +features = [ # TODO: test which of these are actually needed + "fs", + "io-util", + "io-std", + "macros", + "parking_lot", + "process", + "rt", + "rt-multi-thread", + "signal", + "sync", + "time", +] [dependencies.tokio-stream] version = "0.1.7"