Open mlarraz opened 2 months ago
@mlarraz thanks for the PR! I won't be able to fully review this until sometime next week due to other priorities but it looks like a good first step in addressing #1268.
As for the cross-compilation of the resolve-version
binaries, that's a bit more complicated since the setup varies depending on the host/target but typically you need the following:
rustup target add {target}
(e.g.; rustup target add aarch64-apple-darwin
)brew install messense/macos-cross-toolchains/aarch64-unknown-linux-musl
on Mac, sudo apt-get install g++-aarch64-linux-gnu libc6-dev-arm64-cross musl-tools
on Linux)cargo
uses the correct toolchain (e.g.; CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER
and/or CC_AARCH64_UNKNOWN_LINUX_MUSL
)And you're right, the vendored yq
binaries were manually sourced from their releases.
Thanks, I will work on adding the binaries.
I noticed a previous commit referenced compressing the yq binaries, but didn't go into detail. It doesn't look like it was using tar or some other container as the files are still directly executable.
resolve-version-linux
andresolve-version-darwin
toresolve-version-linux-x64
andresolve-version-darwin-x64
get_cpu()
bash function to support ARM (and drop support for i686)get_platform()
function instead ofget_os()
to determine filenameI have not actually managed to build the new binaries myself as I'm not very experienced with Rust, but hoping somebody can help out.
I noticed there's a similar thing happening for
yq
but I didn't see any code handling the vendoring so I assume it was done manually. Presumably it will need ARM versions as wellThis is meant to fix https://github.com/heroku/heroku-buildpack-nodejs/issues/1268