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

Support detection of triplet targets for Rust projects #274

Open
viccuad opened this issue Sep 19, 2022 · 5 comments
Open

Support detection of triplet targets for Rust projects #274

viccuad opened this issue Sep 19, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@viccuad
Copy link

viccuad commented Sep 19, 2022

Summary

For Rust, support detection of cross-compilation and list the system libraries used (glibc, musl, linker, compiler, etc).

This may mean supporting .cargo/config.toml.

This file has sections of [target.<triple>]. These sections specify settings for specific platform targets, see the config.toml docs.. These triplets can be used to compile against a different system library (musl instead of glibc for example), different machine architecture, etc, as usual. Example:

# .cargo/config.toml

[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"

[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"

Note that key options for those sections can be also overridden via env vars. Maybe there's a way to call cargo to obtain the end evaluation that takes into account the env vars.

Background

Right now, SBOM of a rust project compiled for amd64 and glibc is basically the same as if compiled for arm64 and musl. Instead, this information should be included in the SBOM.

@viccuad viccuad added the enhancement New feature or request label Sep 19, 2022
@MdSahil-oss
Copy link

Hi @viccuad, This issue looks interesting to me. I would like to work on it.

@viccuad
Copy link
Author

viccuad commented Feb 14, 2023

Hi @MdSahil-oss, I'm not maintainer of this repo, this was just a feature request from my side :). I suppose you would need to get in contact with them, or directly submit a PR for review!

@nishakm
Copy link
Collaborator

nishakm commented Feb 14, 2023

Hi @MdSahil-oss, This looks like an enhancement that is more suited for https://github.com/opensbom-generator/parsers. cc: @puerco

@MdSahil-oss
Copy link

HI! @nishakm Thanks for letting me know, sure I'll look in the repository for this enhancement But let me know whether this enhancement is approved officially or not :)

@MdSahil-oss
Copy link

@nishakm @puerco Let me know if this enhancement needs to be implemented in the repository so that I can start working on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants