Rust on a chromebook using usb flash drive


#1

I got a chromebook last week with the aim of using it on the move while learning Rust so I messed around with dev mode and booting galliumos and using crouton chroots but neither were really to my liking so until (if my chromebook does get it. Acer R11 CB5-132T-C1LK) crostini comes out I thought i’d give chromebrew a go and after a bit of fiddling because I have an irrational fear of wearing out soldered in emmc I managed to get rust working and thought it might be of interest to others.

1st of all i did the following

that got chromebrew working and installing to a usb drive.

once that was done i created a 2nd partition on the usb drive (i’d left 12 gig free to do so) formatted it to ext4 and add a label too, i used projects

i then created a .cargo and .rustup directories on it and created symlinks to them in my chromebook home directory and also a symlink called .multirust to the .rustup directory on the usb drive.

i’m not sure if this is the case for all chromebooks but on mine the /tmp dir is noexec so remounted it as exec

e.g. sudo mount -o remount,exec /tmp

and the downloaded and ran rustup as per the instruction on rustup.rs

after a bit rustup will have completed and everything is installed but if you run cargo you’ll get permission denied as the usb drive is probably mounted noexec so you’ll need to remount as exec (and probably a good idea to add this to your .bashrc too

sudo mount -o remount,exec /media/removable/projects

and now cargo etc. will work and you can remount /tmp as noexec or just reboot and then enjoy your rusting (or in my case coboling as well)