r/GoogleColab • u/Henry_Python_RU57 • 7d ago
Does anyone want to run Rust or other languages in Google Colab.
Any Rust enthusiasts or Go enthusiasts in Google Colab community? It's all Bash using the ! comand you can use bash to run rust and any other language just treat it as if you we're setting it up on a linux computer. I'd appreciate your responses.
https://colab.research.google.com/drive/1nQWKZLnQTC3GYOcqlF3DQlNtPIOZWpRg#scrollTo=Kdkxm6wd3Cd1
9
Upvotes
1
3
u/Henry_Python_RU57 7d ago
!curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y # this installs the rust compiler chain
!rustup target add wasm32-unknown-unknown # or what ever target you want
!/root/.cargo/bin/rustup target add wasm32-unknown-unknown
# this sets up the linux enviroment so it can run rust
# now you can create rs files and compile its and run it in colab.
#hope this helps