I tracked it down further. When I run snapcraft --target-arch=armhf
it tries to run,
/home/erik/Code/otter/parts/camcontrol/rust/bin/cargo install -j4 --root /home/erik/Code/otter/parts/camcontrol/install --path /home/erik/Code/otter/parts/camcontrol/build
And that fails, however if I append the target to the end as argument and run it manually,
/home/erik/Code/otter/parts/camcontrol/rust/bin/cargo install -j4 --root /home/erik/Code/otter/parts/camcontrol/install --path /home/erik/Code/otter/parts/camcontrol/build --target armv7-unknown-linux-gnueabihf
Then that works. Now how can I do that through snapcraft? I was expecting that to be done automatically when I set the arch for the snapcraft command.
Potentially related: https://github.com/kenOfYugen/web_node_rust/issues/1