I have a cargo workspace project which I build and run on my Windows laptop. The program hosts a backend server. Now, I would like to host this on an AWS EC2 instance which is a Linux machine. What I thought I'd do is first cargo build for linux and then simply put the .exe into the ec2 instance and run it from there.
I tried two things (form my Windows machine):
i)
cargo build --target=x86_64-unknown-linux-gnu
- this gives me some really strange compile errors , like
error[E0412]: cannot find type `Result` in this scope; error: could not compile `once_cell` due to 223 previous errors
ii) Tried another target:
cargo build --target=aarch64-unknown-linux-gnu
And got pretty much same thing.
Is this some limitiation of once_cell? Or, much more likely, I am missing something fundamental here?