Devolutions / Devolutions/IronRDP
Split bitmap codecs out of ironrdp-graphics into dedicated per-codec crates
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 275
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 189
Description
Some codecs live in `ironrdp-graphics` because we prioritized velocity over clean boundaries. This issue tracks moving each bitmap codec into its own crate.
Module boundaries ≠ crate boundaries. A crate gives us:
- Independent dependency tree (no pulling `yuv`/`bitvec`/`bit_field`/etc. just to use one codec)
- Independent compilation unit
- Independent semver
- Per-crate `no_std` story
- Cleaner opt-in: `ironrdp-clearcodec = "..."` over `ironrdp-graphics = { features = ["clearcodec"] }`
`ironrdp-bulk` is a precedent for a self-contained codec-adjacent crate (zero IronRDP deps, `no_std`-compatible). New codec crates should aim for that shape, even if it takes a few iterations to get there.
This is the execution plan for [the existing `_TODO_: break down into multiple smaller crates` on `ironrdp-graphics` in `ARCHITECTURE.md`](https://github.com/Devolutions/IronRDP/blob/3905d177f2417d0e810b437d7e3ee0a7e954c6cc/ARCHITECTURE.md#cratesironrdp-graphics).
## Long-term shape
- Each bitmap codec in its own crate (`ironrdp-nscodec`, `ironrdp-clearcodec`, `ironrdp-progressive`, …).
- `ironrdp-graphics` becomes a shared codec-primitives + image-utilities layer, or is deprecated if nothing remains.
- If crate count grows past ~3–4, consider grouping under `crates/codecs/`.
## Note on shared primitives
RFX-family codecs share helpers in `ironrdp-graphics` (`dwt`, `dwt_extrapolate`, `quantization`, `subband_reconstruction`, `rlgr`, `srl`, private `utils::Bits`). Most are `pub(crate)` today. **Extracting RFX-family codecs requires promoting some of these to `pub`.** Expected and acceptable; document each newly-public item.
Primitives only used by a specific codec can be moved inside that codec's crate.
## Out of scope
- Reorganizing non-codec utilities (`color_conversion`, `image_processing`, `diff`, `pointer`, `rectangle_processing`).
- EGFX `H264Decoder` trait: already correctly factored in `ironrdp-egfx`.
- Splitting `ironrdp-pdu`: tracked separately in .
- Auditing whether `utils::Bits` should be kept, removed, or replaced by a mature crate: separate concern, separate issue.
## Acceptance
- ≥2 codecs extracted, demonstrating the per-crate template (Cargo metadata, README, features, CI).
- `ARCHITECTURE.md` updated with a short paragraph describing the pattern and the residual scope of `ironrdp-graphics`, replacing the bare TODO.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.