legba
legba copied to clipboard
Fix cross compilation in order to generate and distribute precompiled binaries.
Currently, when a new release is published, docker images for linux/amd64
and linux/arm64
are automatically built and pushed to https://hub.docker.com/r/evilsocket/legba. While this allows users to just pull the image and use it on any platform supported by Docker, it'd be ideal to also be able to generate and distribute precompiled binaries that might be better suited for certain scenarios (embedded devices for one).
While I had some success in cross compiling this project for x86_64-unknown-linux-gnu
using cross with this Cross.toml project file, the build still fails for some OS/arch, mostly due to the libsmbclient
and libssl
native dependencies that somehow I still am trying to cross compile and/or install incorrectly.
It'd be awesome if someone with more experience than me on Rust cross compilation could help.
To start we'd need to generate binaries for:
- aarch64-unknown-linux-gnu
- arm-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabi
- x86_64-pc-windows-gnu
- aarch64-apple-darwin
- x86_64-apple-darwin
Ideally support Android and iOS targets in the future too.