How does rust-analyzer ensure compatibility with the current version of rust?

Does the vscode extension download the appropriate language server? Or how does this work?

You install Rust and rust-analyzer as described in the docs: