Skip to content

Commit

Permalink
[doc/crates-io] Add text about packaging tests/benches
Browse files Browse the repository at this point in the history
Fixes <#4262>
  • Loading branch information
behnam committed Jul 11, 2017
1 parent 1566c92 commit da96699
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/doc/crates-io.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,15 @@ are there for the build to succeed. This behavior can be disabled with the
`--no-verify` flag.

Now’s a good time to take a look at the `*.crate` file to make sure you didn’t
accidentally package up that 2GB video asset. There is currently a 10MB upload
size limit on `*.crate` files. Cargo will automatically ignore files ignored by
your version control system when packaging, but if you want to specify an extra
set of files to ignore you can use the `exclude` key in the manifest:
accidentally package up that 2GB video asset, or large data files used for code
generation, integration tests, or benchmarking. There is currently a 10MB
upload size limit on `*.crate` files. So, if the size of `tests` and `benches`
directories and their dependencies are up to a couple of MBs, you can keep them
in your package; otherwsie, better to exclude them.

Cargo will automatically ignore files ignored by your version control system
when packaging, but if you want to specify an extra set of files to ignore you
can use the `exclude` key in the manifest:

```toml
[package]
Expand All @@ -66,7 +71,7 @@ exclude = [
The syntax of each element in this array is what
[rust-lang/glob](https://github.com/rust-lang/glob) accepts. If you’d rather
roll with a whitelist instead of a blacklist, Cargo also supports an `include`
key:
key, which if set, overrides the `exclude` key:

```toml
[package]
Expand Down

0 comments on commit da96699

Please sign in to comment.