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

Allow specifying the profile for cargo build #190

Closed
Johennes opened this issue Dec 18, 2024 · 2 comments · Fixed by #192
Closed

Allow specifying the profile for cargo build #190

Johennes opened this issue Dec 18, 2024 · 2 comments · Fixed by #192
Assignees

Comments

@Johennes
Copy link
Collaborator

Following through from matrix-org/matrix-rust-sdk#4416, matrix-rust-sdk uses the reldbg profile by default. This cannot be selected via UBRN though because we only have a --release flag that switches between the debug and release profiles.

Adding --profile reldbg via cargoExtras does not work because UBRN will still look for the library under the debug or release folder.

Proposal: Add a profile config / CLI option to select the specific profile. If both profile and release are specified, let profile take precedence (as in matrix-rust-sdk).

@jhugman
Copy link
Owner

jhugman commented Dec 18, 2024

This is a good idea, thanks for suggesting it!

It looks like it shouldn't be too difficult to add.

The CommonBuildArgs struct.

Adding an additional profile attribute:

    /// Suitable documentation
    #[clap(long, conflicts_with_all = ["release"]]
    profile: Option<String>,

and adapting the existing fn profile(&self) might be all you need.

I checked: the android cargo ndk command needs to change, as does the cargo build for iOS.

I'm unlikely to get to this before next month, however. Would you like to pick this up, or would you like to wait?

Johennes added a commit that referenced this issue Dec 19, 2024
@Johennes
Copy link
Collaborator Author

Thanks for the pointers. ❤️

I took a stab at it in #192.

@Johennes Johennes self-assigned this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants