From 2c2fbd6463bb3dba492d0387f05f953bdc297d2f Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 31 May 2020 23:18:05 +0800 Subject: [PATCH] Reduce packaged crate size by 5kb using `cargo diet -r` (#983) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Reduce packaged crate size by 5kb using `cargo diet -r` 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 │ └───────────────────────────────────────────┴─────────────┘ * Include COPIRIGHT in package * Ignore benchmarks and tests in rand_distr * prefer using 'src/' instead of 'src/**/*' --- Cargo.toml | 2 +- rand_distr/Cargo.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index cad769f4610..1e2268e178e 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", "COPYRIGHT"] [badges] travis-ci = { repository = "rust-random/rand" } diff --git a/rand_distr/Cargo.toml b/rand_distr/Cargo.toml index d9971562353..d212f460b3d 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" }