mrhooray / crc-rs

Rust implementation of CRC(16, 32, 64) with support of various standards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Finalize on feature flags vs rustc `--cfg` flags for default impl selection

akhilles opened this issue · comments

Context: #92 (comment)

Some advantages of --cfg flags:

  • Don't have to be strictly additive
  • Can only be set when compiling a binary (hidden to libraries)
  • Can throw a compile error if incompatible flags are set
  • Can stop supporting them without breaking semver