rust seems to work on android within termux
There were problems previously (version issues with llvm), but "pkg upgrade" followed by "pkg install rust" leave me with a working rustc. Now to work through the book:-)
Posted Apr 2, 2023, 3:28 PM UTC
There were problems previously (version issues with llvm), but "pkg upgrade" followed by "pkg install rust" leave me with a working rustc. Now to work through the book:-)
Posted Apr 2, 2023, 3:28 PM UTC
I was successful, too. I had to change some things in my code, as environment vars are not the same as on Linux and r/w permissions on storage made a problem with some build.rs code.
I failed to either use only microSD storage or use of network mounted storage, to prevent wearout of internal flash with every compile. Hints appreciated. The alternative would be to cross-compile from PC - don't know how much work this is to set up.
wish I could help. I'm only beginning the rust book, far from doing anything big.
I can't help with your storage questions, either; termux-setup-storage made /sdcard available, e.g. for the Downloads directory, and Termux provides access to its internal home directory through the android file picker, e.g. for uploading files to Google Drive.
For the access to other filesystems and wear and so on, you might ask on r/termux. I expect to do anything bigger than the tiny exercises typed in from the book by ssh-ing into a dev server (I rent a VPS for such).
I searched for "storage" in r/termux, and found the post
https://www.reddit.com/r/termux/comments/10ar1ls/is_there_any_way_to_have_a_prootdistro_run_on_my/
One of the replies to that has a link to
The distribution had intermittent problems a while ago, but has been working stably for at least the last 4 versions for me. Btw. helix is also packaged and works great!
How do you set up rust language support in helix? If I run
cargo new fooand then open up main.rs withhx foo/src/main.rs, I don't see any syntax highlighting. (I'm assuminghxis the command to run helix, I didn't see that documented anywhere but I tried it afterhelixdidn't work.)I just ran
pkg install rust-analyzer. You can also set up a~/.config/helix/languages.toml. I may at some point add one.Currently my rust-analyzer is constantly giving me error "Filed to spawn proc amcro server".Have you facing the error too??
No, but I currently don't develop that much on mobile.
cd foo; hx src/main.rs