Skip to content

Commit

Permalink
Reduce packaged crate size by 5kb using cargo diet -r (#983)
Browse files Browse the repository at this point in the history
* 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/**/*'
  • Loading branch information
Byron committed May 31, 2020
1 parent 4b99567 commit 2c2fbd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -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" }
Expand Down
1 change: 1 addition & 0 deletions rand_distr/Cargo.toml
Expand Up @@ -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" }
Expand Down

0 comments on commit 2c2fbd6

Please sign in to comment.