Standalone rust nightly installer to cross compile aarch64

    1. Could not use rustup because of Network Restrictions;
    1. Host: x86_64 ubuntu18; Installed x86_64-unknown-linux-gnu.tar.gz;
    1. component: all components of x86_64-unknown-linux-gnu.tar.gz;
      rustc
      cargo
      rls-preview
      rust-analyzer-preview
      clippy-preview
      miri-preview
      rustfmt-preview
      llvm-tools-preview
      rust-analysis-x86_64-unknown-linux-gnu
      rust-std-x86_64-unknown-linux-gnu
      rust-docs
    1. manually add component rust-src (add libarary to /usr/local/lib/rustlib/src) because project using -Zbuild-std=core,alloc

Question : can't find crate for std;
how to use standalone rust nightly version to crosscompile aarch64 on x86_64 host?

You'll need to also install the rust-std component for your target platform. For example: rust-std-nightly-aarch64-unknown-linux-gnu.tar.xz

(If you were using rustup, you would run rustup target add aarch64-unknown-linux-gnu.)

  1. standalone rust nightly version x86_64-unknown-linux-gnu.tar.gz + rust-src component could crosscompile aarch64 on x86_64 host.
  2. Add flags -Zbuild-std=core,alloc could compile target libarary.
  3. modify component and add rust src dir
    Name@ubuntu:~/8-tools/toolchain/rust-nightly-x86_64-unknown-linux-gnu$ tree -L 3 rust-src/
    rust-src/
    ├── lib
    │   └── rustlib
    │       └── src
    └── manifest.in
    
    3 directories, 1 file
    Name@ubuntu:~/8-tools/toolchain/rust-nightly-x86_64-unknown-linux-gnu$