Skip to content

Commit

Permalink
Merge pull request #1127 from HeroicKatora/public-private-dependencies
Browse files Browse the repository at this point in the history
Add travis script and public dependency reference
  • Loading branch information
HeroicKatora committed Feb 2, 2020
2 parents 90a21f3 + 081dcc0 commit 4c592d7
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Expand Up @@ -52,6 +52,14 @@ matrix:
script:
- rustup component add clippy
- cargo clippy
- os: linux
rust: nightly
name: "Public private dependencies"
script:
- mv ./Cargo.toml.public-private-dependencies ./Cargo.toml
- echo "#![deny(exported_private_dependencies)]" | cat - src/lib.rs > src/lib.rs.0
- mv src/lib.rs.0 src/lib.rs
- cargo check
script:
- if [ -n "${FEATURES+exists}" ]; then
cargo build -v --no-default-features --features "$FEATURES" &&
Expand Down
58 changes: 58 additions & 0 deletions Cargo.toml.public-private-dependencies
@@ -0,0 +1,58 @@
cargo-features = ["public-dependency"]

[package]
name = "image"
version = "0.23.0-preview.0"
edition = "2018"
license = "MIT"
description = "Imaging library written in Rust. Provides basic filters and decoders for the most common image formats."
authors = ["The image-rs Developers"]
readme = "README.md"
documentation = "https://docs.rs/image"
repository = "https://github.com/image-rs/image"
homepage = "https://github.com/image-rs/image"
categories = ["multimedia::images", "multimedia::encoding"]
exclude = [
"src/png/testdata/*",
"examples/*",
"tests/*",
]

[lib]
name = "image"
path = "./src/lib.rs"

[dependencies]
# Not yet public.
bytemuck = "1"
byteorder = "1.3.2"
num-iter = "0.1.32"
num-rational = "0.2.1"
# Public due to Pixel, otherwise quite useless.
num-traits = { version = "0.2.0", public = true }
gif = { version = "0.10.0", optional = true }
jpeg = { package = "jpeg-decoder", version = "0.1", default-features = false, optional = true }
png = { version = "0.15.2", optional = true }
scoped_threadpool = { version = "0.1", optional = true }
tiff = { version = "0.4.0", optional = true }

[dev-dependencies]
crc32fast = "1.2.0"
num-complex = "0.2.0"
glob = "0.3"
quickcheck = "0.9"

[features]
default = ["gif", "jpeg", "ico", "png", "pnm", "tga", "tiff", "webp", "bmp", "hdr", "dxt", "dds", "jpeg_rayon"]

ico = ["bmp", "png"]
pnm = []
tga = []
webp = []
bmp = []
hdr = ["scoped_threadpool"]
dxt = []
dds = ["dxt"]
jpeg_rayon = ["jpeg/rayon"]

benchmarks = []

0 comments on commit 4c592d7

Please sign in to comment.