`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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T5SYDExxL4vZgvunrcNSMc
79 lines
2.1 KiB
TOML
79 lines
2.1 KiB
TOML
[package]
|
|
name = "trueskill-tt"
|
|
version = "0.1.2"
|
|
edition = "2024"
|
|
rust-version = "1.85"
|
|
description = "TrueSkill Through Time: Bayesian skill rating that tracks how skill evolves over time, via Gaussian message passing"
|
|
repository = "https://git.aceofba.se/logaritmisk/trueskill-tt"
|
|
authors = ["Anders Olsson"]
|
|
# Publishing is restricted to the private kellnr registry; this also makes
|
|
# an accidental `cargo publish` to crates.io a hard error rather than a
|
|
# irreversible mistake. Index is declared in `.cargo/config.toml`.
|
|
publish = ["kellnr"]
|
|
readme = "README.md"
|
|
keywords = ["trueskill", "rating", "bayesian", "elo", "skill"]
|
|
categories = ["algorithms", "science", "game-development"]
|
|
# TODO: pick a licence before publishing. `cargo publish` rejects a crate
|
|
# 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.
|
|
# `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
|
|
|
|
[[bench]]
|
|
name = "batch"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "gaussian"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "history_converge"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "scored"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "ingest"
|
|
harness = false
|
|
|
|
[dependencies]
|
|
approx = { version = "0.5.1", optional = true }
|
|
rayon = { version = "1", optional = true }
|
|
smallvec = "1"
|
|
|
|
[features]
|
|
approx = ["dep:approx"]
|
|
rayon = ["dep:rayon"]
|
|
|
|
[dev-dependencies]
|
|
criterion = "0.5"
|
|
plotters = { version = "0.3", default-features = false, features = ["svg_backend", "all_elements", "all_series"] }
|
|
plotters-backend = "0.3"
|
|
time = { version = "0.3", features = ["parsing"] }
|
|
trueskill-tt = { path = ".", features = ["approx"] }
|
|
|
|
[profile.release]
|
|
debug = true
|
|
|
|
[profile.bench]
|
|
debug = true
|
|
|
|
[profile.dev]
|
|
debug = true
|