Skip to content

fix(build): append .exe binary based on target triple instead of running OS, closes #3870#4032

Merged
lucasfernog merged 4 commits intotauri-apps:devfrom
Pierstoval:3870-bin-exe-suffix
May 3, 2022
Merged

fix(build): append .exe binary based on target triple instead of running OS, closes #3870#4032
lucasfernog merged 4 commits intotauri-apps:devfrom
Pierstoval:3870-bin-exe-suffix

Conversation

@Pierstoval
Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

Yes, a minor one I hope:

cli::interface::rust::get_binaries() gets a new target: Option<String> argument, which is the target triple you want to build your application for.

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

The side-effect of this is that it enables using cross as build runner to attempt cross-compiling projects.

Request for suggestions:

As the target is currently optional because it should fall back to the current target triple, I need some help knowing how to get the current target triple (in a cleaner way than what I currently found) so that we can no longer depend on an optional value.

I thought we could use these build-in constants ARCH, OS and FAMILY (from there: https://doc.rust-lang.org/std/env/consts/index.html ), but not sure of their reliability regarding Tauri's ecosystem.

@Pierstoval Pierstoval requested review from a team May 2, 2022 20:28
@Pierstoval Pierstoval requested a review from a team as a code owner May 3, 2022 00:12
@lucasfernog
Copy link
Copy Markdown
Member

We already have a function to get the current target triple :) awesome PR!

@Pierstoval
Copy link
Copy Markdown
Contributor Author

Thanks a lot for all the fixes @lucasfernog !

Copy link
Copy Markdown
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ❤️

@lucasfernog lucasfernog merged commit 4562e67 into tauri-apps:dev May 3, 2022
@Pierstoval
Copy link
Copy Markdown
Contributor Author

Thanks for merging 🚀

@Pierstoval Pierstoval deleted the 3870-bin-exe-suffix branch May 3, 2022 19:51
dceddia pushed a commit to dceddia/tauri that referenced this pull request May 14, 2022
…ing OS, closes tauri-apps#3870 (tauri-apps#4032)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
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 this pull request may close these issues.

2 participants