Rust is not faster than JavaScript!
Rust is also not faster than C++.
The compiled binary code might be faster than the compiled binary code of either of the others. But that's a compiler question, not a language question.
Some languages make it easier to compile to performant