Skip to content

Commit

Permalink
Configure cargo vendor-filterer
Browse files Browse the repository at this point in the history
See https://github.com/cgwalters/cargo-vendor-filterer

This project also only targets CoreOS/Linux so we don't need
any other platform dependencies.  Most notably this obsoletes
the manual step to strip all the large prebuilt static `.a` files
for the windows crates.

```
$ du -sh vendor-filtered vendor
54M     vendor-filtered
135M    vendor
```

(And that's after the `find vendor -name '*.a' -delete`)

Checklist update in coreos/repo-templates#4.
  • Loading branch information
cgwalters authored and bgilbert committed Jun 27, 2022
1 parent 417adf2 commit dad44d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ pre-release-commit-message = "cargo: coreos-installer release {{version}}"
pre-release-hook = ["make", "docs", "clean"]
tag-message = "coreos-installer v{{version}}"

# See https://github.com/cgwalters/cargo-vendor-filterer
[package.metadata.vendor-filter]
# Right now the vendor filter doesn't support wildcards, so use this as a stand-in.
# xref https://github.com/cgwalters/cargo-vendor-filterer/issues/23
# Note that architecture-specific crate dependencies (apart from wasm32) are uncommon
# in the ecosystem, but this project actually does have s390x-specific dependencies (below).
platforms = ["x86_64-unknown-linux-gnu", "s390x-unknown-linux-gnu"]
all-features = true

[features]
# rdcore is only useful inside the initrd of a CoreOS system
rdcore = []
Expand Down

0 comments on commit dad44d3

Please sign in to comment.