Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Arch Directory Structure #579

Closed
hone opened this issue Jun 21, 2023 · 2 comments · Fixed by #580
Closed

Multi-Arch Directory Structure #579

hone opened this issue Jun 21, 2023 · 2 comments · Fixed by #580

Comments

@hone
Copy link
Member

hone commented Jun 21, 2023

Currently when using cargo libcnb package, it outputs the resulting buildpack into target/buildpack. This works great in the default (single arch) use case, but if you want to support multiple archs they will clobber each other. What if we put buildpack inside an arch directory? For instance:

target/buildpack/<mode>/<name> -> target/buildpack/<arch>/<mode>/<name>

Another alternative but could just be a good addition would be an --out-dir like cargo build (though this is unstable atm).

@jasonschroeder-sfdc
Copy link

There may be patterns to follow from here... rust-lang/cargo#8875
It reminds me of macOS universal binaries, where one file supports multi-arch.

I think --out-dir is more flexible (and could be used to implement the first option)

@Malax
Copy link
Member

Malax commented Jun 22, 2023

target/buildpack/<mode>/<name> -> target/buildpack/<arch>/<mode>/<name>

Is exactly what Cargo does in the regular target directory. I think keeping parity with Cargo itself is worthwhile, especially when we're using the same output directory. We did this for the command line arguments as well to keep the surprise factor low.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants