johannesvollmer / exrs

100% Safe Rust OpenEXR file library
Other
153 stars 24 forks source link

Drop flume to reduce dependency footprint now that std has a good channel #243

Closed Shnatsel closed 3 weeks ago

Shnatsel commented 1 month ago

Two years ago the standard library's channel implementation was switched to a variant of crossbeam-channel. Now that std ships a good channel implementation, there is no reason to pull in a third-party one.

This removes a lot of dependency bloat from the image crate:

│   ├── flume v0.10.9
│   │   ├── futures-core v0.3.0
│   │   ├── futures-sink v0.3.0
│   │   ├── nanorand v0.6.0
│   │   │   └── getrandom v0.2.3
│   │   │       ├── cfg-if v1.0.0
│   │   │       └── libc v0.2.133
│   │   ├── pin-project v1.0.2
│   │   │   └── pin-project-internal v1.0.2 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.52
│   │   │       │   └── unicode-ident v1.0.0
│   │   │       ├── quote v1.0.26
│   │   │       │   └── proc-macro2 v1.0.52 (*)
│   │   │       └── syn v1.0.67
│   │   │           ├── proc-macro2 v1.0.52 (*)
│   │   │           ├── quote v1.0.26 (*)
│   │   │           └── unicode-xid v0.2.0
│   │   └── spin v0.9.2
│   │       └── lock_api v0.4.0
│   │           └── scopeguard v1.1.0

All the fields with channels in them are private, so this is semver-compatible.

This change has no effect on benchmarks on my 6-core desktop CPU.

johannesvollmer commented 1 month ago

Sounds good, happy to merge :) thanks!

Shnatsel commented 4 weeks ago

I'd appreciate if you could get this merged and released to crates.io sometime soon. Although I'm not in a rush to hit any particular deadline :)