Rust assumes a runtime, the standard library assumes a stack exists, a heap exists, and that main() is called by an OS;
Source: I'm writing Rust without a runtime without a heap and without a main function. You can too.
The Rust runtime will, at a minimum, set up the stack pointer, zero out the .bss, and fill in the .data section. You're right in that a heap is optional, but Rust will get very cranky if you don't set up the .data or .bss sections.
The Rust runtime will, at a minimum, set up the stack pointer, zero out the .bss, and fill in the .data section. You're right in that a heap is optional, but Rust will get very cranky if you don't set up the .data or .bss sections.