|
|
|
|
|
by maxwell86
1636 days ago
|
|
That’s trivial to do with cfg-if and similar crates. There are many Rust libraries that support dozen different hardware architectures using conditional compilation. Rust has many pain points, but conditional compilation isn’t one. What ever weird constraint or desire you have, a macro would solve it nicely for your case. |
|
Most of the crates which I've seen which do that kind of thing in my experience seem to use features or conditional modules, which as I've discussed above have other downsides. Others like Vek seem to just get LLVM to do the work.
I think that's a bit disingenuous: I've certainly found Rust's infrastructure in this area quite limiting and a pain point for myself.