From 8d47e54a8a5038ff10ae537c6900d6e85c01a541 Mon Sep 17 00:00:00 2001 From: Anders Olsson Date: Thu, 27 Aug 2026 17:29:44 +0200 Subject: [PATCH] chore: keep the 48 MB ATP dataset out of the published crate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `cargo publish --dry-run` packaged 48.1 MiB (8.6 MiB compressed) for a library whose source is 312 KB. All of it was examples/atp.csv, a tennis dataset the atp example reads. examples/atp.rs opens it by relative path at runtime rather than include_str!, so excluding the data still compiles and `cargo package --verify` still builds every target — the example just needs the file fetched from the repo to run. Packaged size is now 360.8 KiB / 83.1 KiB compressed, a 133x reduction. Every consumer would otherwise have paid that download. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01T5SYDExxL4vZgvunrcNSMc --- Cargo.toml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 24815fd..cca3b40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,17 @@ categories = ["algorithms", "science", "game-development"] # without `license` (or `license-file`), and without one the source carries no # stated terms. The Rust convention is `license = "MIT OR Apache-2.0"` plus the # matching LICENSE-MIT / LICENSE-APACHE files. -exclude = ["/docs", "/benches/*.txt", "/temp", "/.gitea"] +# `examples/atp.csv` is a 48 MB tennis dataset — 99% of the packaged crate, +# for a library whose source is 312 KB. `examples/atp.rs` opens it by +# relative path at runtime, so excluding the data still compiles; the +# example just needs the file fetched from the repo to run. +exclude = [ + "/docs", + "/benches/*.txt", + "/temp", + "/.gitea", + "/examples/atp.csv", +] [lib] bench = false