scripts: avoid to recompile rust at every invocation of make build-deps
This MR fix a couple of minor issues with the rust dependency installation script
- Adds the possibility for the user to specify a different rust version. It also prints a fat warning in this case
- move the built rust dependency in sub-directories of
lib/
andinclude/
- prevent the script to recompile the rust dependencies each time the script is invoked.
The last point is done by adding a new directory _build_rust
where we keep the run dependency and code
and we allow cargo to decide if the dependencies need to be rebuilt or not.
To test, run make build-deps
twice. The second time, the rust dependencies won't be built
Releated issue: #979 (closed)
reviewers: @paracetamolo
Edited by pietro