From dca378299d82534c75c726fd8dfcf299fbc64dca Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 28 May 2020 21:46:13 +0800 Subject: [PATCH 1/4] Reduce packaged crate size by 5kb using `cargo diet -r` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It converted excludes into includes, removing the following files from the package. ┌───────────────────────────────────────────┬─────────────┐ │ File │ Size (Byte) │ ├───────────────────────────────────────────┼─────────────┤ │ .gitignore │ 77 │ │ .github/ISSUE_TEMPLATE/other.md │ 80 │ │ .github/ISSUE_TEMPLATE/feature_request.md │ 274 │ │ .github/ISSUE_TEMPLATE/compile-issue.md │ 488 │ │ utils/ci/install_cargo_web.sh │ 536 │ │ COPYRIGHT │ 569 │ │ utils/ci/miri.sh │ 815 │ │ rustfmt.toml │ 863 │ │ benches/weighted.rs │ 1088 │ │ utils/ci/install.sh │ 1381 │ │ utils/ci/script.sh │ 1583 │ │ examples/monte-carlo.rs │ 1611 │ │ appveyor.yml │ 2098 │ │ SECURITY.md │ 2822 │ │ .travis.yml │ 2952 │ │ utils/ziggurat_tables.py │ 3929 │ │ examples/monty-hall.rs │ 4004 │ │ benches/misc.rs │ 4524 │ │ benches/seq.rs │ 5410 │ │ benches/generators.rs │ 5490 │ └───────────────────────────────────────────┴─────────────┘ --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ce5f53e9ce4..8ace31838fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,9 +12,9 @@ Random number generators and other randomness functionality. """ keywords = ["random", "rng"] categories = ["algorithms", "no-std"] -exclude = ["/utils/*", "/.travis.yml", "/appveyor.yml", ".gitignore"] autobenches = true edition = "2018" +include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"] [badges] travis-ci = { repository = "rust-random/rand" } From 570c2c3ec831d4057c5a3992be0aad61e8ebbd8c Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 28 May 2020 23:01:24 +0800 Subject: [PATCH 2/4] Include COPIRIGHT in package --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8ace31838fb..3e56326b3bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ keywords = ["random", "rng"] categories = ["algorithms", "no-std"] autobenches = true edition = "2018" -include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"] +include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"] [badges] travis-ci = { repository = "rust-random/rand" } From de89ebdfad89c57b0a2b6ef53a78ef6d6a3b3deb Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 29 May 2020 19:10:35 +0800 Subject: [PATCH 3/4] Ignore benchmarks and tests in rand_distr --- rand_distr/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/rand_distr/Cargo.toml b/rand_distr/Cargo.toml index d9971562353..b5c742dab90 100644 --- a/rand_distr/Cargo.toml +++ b/rand_distr/Cargo.toml @@ -13,6 +13,7 @@ Sampling from random number distributions keywords = ["random", "rng", "distribution", "probability"] categories = ["algorithms"] edition = "2018" +include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"] [badges] travis-ci = { repository = "rust-random/rand" } From 34919270f9506a5f6d63a4aafd138950426a4aff Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 31 May 2020 10:16:42 +0800 Subject: [PATCH 4/4] prefer using 'src/' instead of 'src/**/*' --- Cargo.toml | 2 +- rand_distr/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3e56326b3bb..202e8caeb56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ keywords = ["random", "rng"] categories = ["algorithms", "no-std"] autobenches = true edition = "2018" -include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"] +include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"] [badges] travis-ci = { repository = "rust-random/rand" } diff --git a/rand_distr/Cargo.toml b/rand_distr/Cargo.toml index b5c742dab90..d212f460b3d 100644 --- a/rand_distr/Cargo.toml +++ b/rand_distr/Cargo.toml @@ -13,7 +13,7 @@ Sampling from random number distributions keywords = ["random", "rng", "distribution", "probability"] categories = ["algorithms"] edition = "2018" -include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"] +include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"] [badges] travis-ci = { repository = "rust-random/rand" }