Not familiar with the rust plugin though, but adding git-core package to the build-packages keyword might work.
The build works on local due to the fact that Git is already installed on the host, but in cleanbuild it is processed in an explicitly clean Ubuntu Core LXD container, which won’t have all the necessary dependencies to build a package, which must be enumerated manually.
Downloading cfg-if v0.1.3
warning: spurious network error (2 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/cfg-if/0.1.3/download`, got 500
warning: spurious network error (1 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/cfg-if/0.1.3/download`, got 500
error: unable to get packages from source