Kaitai is one of many different tools that do this, there is a list of them here:

https://github.com/dloss/binary-parsing

Personally I like GNU Poke.

Is anyone aware of a project that provides simplified declaration of constraint checking?

For example:

  structures:
    struct a { strz b, strz c, int d, str[d] e }
  
  constraints:
    len(b) > len(c)
    d > 6
    d <= 10
    e ~ /^ABC\d+/