Some rust-lover set me this rust program to demonstrate how to get a reasonably-sized hello world in Rust;
#![no_std]
#![no_main]
use core::ffi::CStr;
#[no_mangle]
pub extern fn main(_argc: i32, _argv: *const *const core::ffi::c_char) -> i32 {
unsafe{libc::printf(CStr::from_bytes_with_nul_unchecked("hello world\n\0".as_bytes()).as_ptr());}
0
}
#[cfg(not(test))]
#[panic_handler]
fn panic(_:&core::panic::PanicInfo)->! {
loop{}
}
(Or you can just write in C);
#include <stdio.h>
int main() { printf("hello world\n"); }
Furthermore, the only rust compiler is almost certainly compromised with multiple backdoors, as the only compiler that can compile rust is rustc version N-1.
That's right, if you want to bootstrap rust, you need to bootstrap gcc, then use it to compile an ancient Rust compiler implementation (written in C++) and use that to compile every single Rust version in sequences (requiring hundreds of gigabytes of storage for text and countless CPU cycles).
I'd be highly impressed if no-one managed to slip a backdoor into any of the massive Rust releases from the past several years - I suspect there are several backdoors, as there's plenty of space to fit them in such massive binaries.
Furthermore, the typical Rust program uses hundreds of dependencies, all statically linked.
Rust also often forces you to write 10 times lines to do something that takes 1 line in C.
Remember that most security bugs in software are logic errors (i.e. wrong logic for checking passwords etc) and even if Rust is memory safe and doesn't have memory bugs, you end up with 10x the logic errors and therefore 10x the security bugs, as you have 10x more code.
All that is needed is enhanced static and dynamic analyzers for C - for example there should be an gcc option where it won't compile the GNU C unless the program is free of memory errors and then such could be run on the tried and tested C codebases to tease out the remaining memory bugs - but that software is under a freedom-defending license, thus it must be rewritten under a weak one instead.
As you can see, the Rust cancer needs to be to cut away with a plasma cutter and a corrosion-protective coating applied.