Wednesday, May 17, 2023

How to install rust in termux, Getting started with rust language on android ?

 1. How to install rust language on termux 

To install rust in termux execute the following cmd 

1. pkg update && pkg upgrade 
2. pkg install rust
if you are getting some error then try termux-change-repo to change the repo and select any random repo .
After that execute the same command 
Confirm the installation of rust on termux by executing `rustc --version` command , you should get version installed on your termux.




2. Now install any text editor that you like , you are going to write hello word program in rust  

I am using vim as a text editor for a while now , so i will use that 
Run these commnad
 vim hello.rs

fn main() { println!("Hello, world!"); }

save the file now it's time to run it,

rustc hello.rs

rust will generate a executable binary
./hello

Thanks

No comments:

Post a Comment

what is free fire phishing and how you can avoid it ?.

 Hello friends in this blog we are going to know how hackers are able to hack your free fire account and taking control of it . We are going...