termux-pacman / glibc-packages

Glibc packages for termux
MIT License
134 stars 19 forks source link

[Package]: rust / rustup #270

Open newDINO opened 4 months ago

newDINO commented 4 months ago

Why is it worth to add this package?

  1. The rust in [main] packages is for the android target. Rust with glibc will allow compiling for gnu/linux.
  2. With rustup, we can download multiple tool chains for different targets.
  3. Many GUI crates in rust will detect the environment when being compiled. When compiled using the rust package in [main], these crates will think that they are compiled for android. So I can't compile them for x11 without modifying these crates' sources.

Home page URL

www.rust-lang.org

Source code URL

https://github.com/rust-lang/rust

Packaging policy acknowledgement

Additional information

  1. I haven't tried to compile rust. But I tried to run the rustc binary using grun and it worked. The binary is downloaded from https://mirrors.tuna.tsinghua.edu.cn/rustup/dist/2024-06-13/rust-1.79.0-aarch64-unknown-linux-gnu.tar.gz.
  2. I tried to install rustup but encountered some issues. First, I downloaded the install script from https://sh.rustup.rs and ruan it with "grun --shell" but it failed. The possible reason is that it can't create tmp files. So, I downloaded the rustup-init binary directly from http://static.rust-lang.org/rustup/dist/aarch64-unknown-linux-gnu/rustup-init and ran it using grun. It can install the rust tool chains, but the installed tool chain at .cargo/bin failed to run using grun.