> First, bit field descriptors is a huge pain - where, in C, you would define an enum for the task, there isn't a real equal in vanilla Rust
“A litany of constants” is exactly what your c enum is though.
And you can define a "degenerate" Rust enum with explicit discriminant values:
enum Foo {
A = 1,
B = 2,
C = 4
}
They are cast-able to integrals too:
println!("{}", Foo::C as usize); // prints "4"
Doesn’t work so well for flags however.
> Second, the over-reliance on nightly is a tough sell for - having inline asm gated makes it very hard.
The alternative would be to simply not make the feature available at all until it is done and ready, with even higher risk (as it would have been exercised even less).
As is, if the feature is fine for you as-is you can use it, and if you can't or don't want to use nightly you can go and assist its shepherding to stable (https://github.com/rust-lang/rust/issues/72016)
> while format is great, it's also very heavyweight. Not having (AFAIK) variadic arguments is hard, and there isn't really an equal to printf.
There are no safe Rust-level variadics, but Rust can call C variadic functions, and under RFC 2137 (not stable yet I think) define them as well.