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 cross install #1595

Open
1 of 2 tasks
dfego opened this issue Dec 10, 2024 · 5 comments
Open
1 of 2 tasks

Support cross install #1595

dfego opened this issue Dec 10, 2024 · 5 comments

Comments

@dfego
Copy link

dfego commented Dec 10, 2024

Checklist

Describe your request

I would like to use tools like cargo-bloat with cross, but when I attempt to cross install, I see:

[cross] warning: specified cargo subcommand `install` is not supported by `cross`.
[cross] note: Falling back to `cargo` on the host.

So I assume this is not supported.

I have no idea what kind of lift it would be, but it would be helpful, because I don't know of any alternatives at the moment.

Describe why this would be a good inclusion for cross

Being able to use other cargo packages within cross feels like a natural extension of the current functionality.

@Emilgardis
Copy link
Member

Please see the discussion in #1215

Closing this as a dupe!

@Emilgardis Emilgardis closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
@Emilgardis Emilgardis reopened this Dec 10, 2024
@Emilgardis
Copy link
Member

Emilgardis commented Dec 10, 2024

Sorry, I may have been a bit to hasty in resolving this issue. This might be a slightly different ask.

You want this install to persist into the cross container? Then technically the work behind #716 would solve a minor painpoint, but we already support this. There's no reason to use cross to install, just use cargo (assuming your host is x86_64-unknown-linux-gnu). We already mount $CARGO_HOME/bin into the container

@dfego
Copy link
Author

dfego commented Dec 10, 2024

Okay I didn't find that issue, because despite searching (with quotes) "cargo install", it was buried on page 3 for me. So apologies on that.

But basically, tools like cargo-bloat seem to require compiling of the underlying program to produce output, so yes, I think I'd like it to be in the container? So if I want to analyze the produced cross-compiled application, rather than what is produced on my host, I'd need it to be actually installed with the cargo target. I think.

@Emilgardis
Copy link
Member

if you want cross bloat to work then #716 is what is needed

@Emilgardis
Copy link
Member

for now though, you should be able to do

cross-util run --target <target> -it -- cargo bloat

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

No branches or pull requests

2 participants