Skip to content

Commit 2c2fbd6

Browse files
authored
Reduce packaged crate size by 5kb using cargo diet -r (#983)
* 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/**/*'
1 parent 4b99567 commit 2c2fbd6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Random number generators and other randomness functionality.
1212
"""
1313
keywords = ["random", "rng"]
1414
categories = ["algorithms", "no-std"]
15-
exclude = ["/utils/*", "/.travis.yml", "/appveyor.yml", ".gitignore"]
1615
autobenches = true
1716
edition = "2018"
17+
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
1818

1919
[badges]
2020
travis-ci = { repository = "rust-random/rand" }

rand_distr/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Sampling from random number distributions
1313
keywords = ["random", "rng", "distribution", "probability"]
1414
categories = ["algorithms"]
1515
edition = "2018"
16+
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
1617

1718
[badges]
1819
travis-ci = { repository = "rust-random/rand" }

0 commit comments

Comments
 (0)