It depends on your dependencies. If all your dependencies are native rust crates, i.e. do not link to C-libraries, you can simply compile your project from cargo by invocing --target=armv7-unknown-linux-gnueabihf (you need to add the target first with rustup target add armv7-unknown-linux-gnueabihf).
If you have C-dependencies then things get messy, like it is stated in your referenced git.
You can read more about cross-compiling in Rust at this git.
Thank you for your answer. I have tried what you described before, and unfortunately that doesn't work. This got me thinking, however, and I found something that does work for my simple program:
I'm uncertain about the applicability specifically for cross-compilation, but you could look into the vscode "remote development" addon. That includes options to run the vscode backend in the docker container, via ssh, or in WSL.