Skip to content

Commit a19a2df

Browse files
joaoh82claude
andauthored
fix(release): scope published crate with include allowlist (fixes crates.io 413) (#154)
The `sqlrite-engine` crate publish for v0.11.0 was rejected by crates.io: status 413 Payload Too Large: max upload size is: 10485760 The package root is the workspace root and the engine [package] had no `include`/`exclude`, so `cargo publish` swept the ENTIRE repo tree — every sibling member plus `web/`, `images/`, and the journal example's demo media. After SQLR-42 (web/public/playground/pkg/*.wasm, 2.1 MiB) and SQLR-43 (examples/desktop-journal/docs/demo.gif 9 MiB + demo.mp4 8.7 MiB + screenshots) landed since v0.10.2, the uncompressed tarball hit ~25 MiB and blew the 10 MiB cap. Patch releases before that stayed under the limit, which is why this is the first time it broke. Fix: add an `include` allowlist so only the library/REPL sources, the three declared `[[example]]` targets (their .rs files must be in the tarball or `cargo publish`'s verify step can't parse the manifest), and the readme/license ship. An allowlist beats `exclude` here because new large files anywhere in the repo can't silently re-bloat the crate. Verified locally: `cargo package -p sqlrite-engine` produces a 376 KiB .crate (down from ~25 MiB uncompressed) and the packaged crate compiles clean against the already-published sqlrite-ask 0.11.0. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 44b16e3 commit a19a2df

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Cargo.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,28 @@ description = "Light version of SQLite developed with Rust. Published as `sqlrit
3535
repository = "https://github.com/joaoh82/rust_sqlite"
3636
license = "MIT"
3737

38+
# Allowlist of files that ship in the published crate. The package root
39+
# IS the workspace root, so without this `cargo publish` sweeps the
40+
# ENTIRE repo tree — every sibling member, plus `web/`, `images/`, and
41+
# the `examples/desktop-journal/docs/` demo media. That ballooned the
42+
# v0.11.0 tarball to ~25 MiB and crates.io rejected it (HTTP 413, 10 MiB
43+
# cap) after SQLR-42/43 landed the playground wasm + the journal
44+
# demo.gif/.mp4. An allowlist (vs. a fragile `exclude`) keeps the crate
45+
# small no matter what large files land elsewhere in the repo later.
46+
#
47+
# What's listed: the library + REPL bin sources (`src/**`), the three
48+
# `[[example]]` targets declared below (their `.rs` files must be in the
49+
# tarball or `cargo publish`'s verify step fails to parse the manifest),
50+
# and the readme/license. `Cargo.toml` is always included implicitly.
51+
include = [
52+
"src/**/*",
53+
"examples/rust/quickstart.rs",
54+
"examples/hybrid-retrieval/hybrid_retrieval.rs",
55+
"examples/rust/concurrent_writers.rs",
56+
"README.md",
57+
"LICENSE",
58+
]
59+
3860

3961
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
4062

0 commit comments

Comments
 (0)