I have a few questions regarding how the stack is manipulated for Rust function calls.
The Rust book suggests that the arguments are passed from left to right on the stack with the stack growing upwards. ( https://doc.rust-lang.org/book/first-edition/the-stack-and-the-heap.html )
This confuses me a little bit as I always thought that the stack order, how arguments are passed adhered to some calling convention. I was wondering what is the exact convention that Rust uses for its function calls? Because it doesn’t look like cdecl so I am not sure what exactly it is. I have looked online but I haven’t found anything concrete regarding this.
I know Rust allows the use of different calling conventions so I was wondering how that is incorporated as well.
Any help is appreciated in this matter. Thanks