I wonder IFF Rust had an effects system that a Jasmin MIR transform (ie like SPIRV is for shaders) would be useful?
C compilers, Rust compilers, and assemblers are all deterministic.
Modern compilers are extremely clever and will produce machine code that takes full advantage of modern CPU branch predictors, and reorder instructions to better take advantage of pipelining. This in itself will make the same code run at different speeds depending on the input data.
Then there is the whole issue of compiler version roulette. As a developer you have no idea which version of compilers your users and distros will use, and what new and wonderful optimisation they will bring.
Determinism does not mean “easy to predict”, it just means “predictable”.
Within a version, yes, but not cross version. Different versions of GCC/Clang etc can give you completely different code.
However for the container/extractor... those should absolutely be in a memory safe language, and those are were a lot of the exploits/crashes are, too, as metadata is more fuzzy.
As a practical example of this see something like CrabbyAVIF. All the parser code is rust, but it delegates to dav1d for the actual codec portion
Compare the number of CVEs against x264 (included decoders don't count!) and FFmpeg's H.264 decoder.
There's other memory-safe languages, and there's formal verification.
e.g. seL4 favors pancake.
Really? How many codecs have your neighbors contributed money for the development of, just curious.