I recently installed the rust programming language in termux (armeabi-v7a 32bit),
but I'm having trouble with cargo
cargo --version illegal instruction
Rust is required during the build phase of python cryptography, (you do not need to have Rust installed after you've built cryptography)
So I can't have any Python cryptography either, in a Murphy's Law way!.
Why should another programming language be used for python cryptography?
I think this is a disadvantage for a programming language that can't do it itself.
Interesting. If I understand correctly, Android is currently Tier 2 without host tools, i.e. I'd probably expect the installation to fail entirely. What does rustup toolchain list show?
Last I checked, rustup doesn't work because it doesn't detect the platform correctly. You need to add the its-pointless repo and then run pkg install rust. I think if you try pkg install rust first, it'll tell you how to add the repo.
Because Python is incredibly slow. Basically because it is an interpreted language and makes use of a garbage collector. All performance sensitive work done in Python is actually done in a language that compiles to fast native code. Like C, C++ and now Rust.
Yes, that is a disadvantage of using language systems like Python. Typically less of a disadvantage if the code Python depends on in written in C/C++ as they have been everywhere for decades.
Adding Rust as a dependency of Python cryptography was very controversial for this exact reason. Their FAQ addresses the upsides but not really this downside of their decision.
It's definitely not a problem with the language. It's most likely a problem with rustup. You can try installing rustc/cargo/std from your package manager, but the way most likely to succeed would be to cross-compile rustc/cargo/std from a different platform and copy it over.
The illegal instruction error immediately strongly suggests that the cargo binary you want to run has been compiled for a CPU other than the one you actually have there.
How can We build a cargo project for the one you have there?
Shouldn't it do this automatically? lscpu (or dpkg --print-architecture) Display information about the CPU architecture.