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

[feat] beforeBuildCommand/beforeDevCommand needs a target triple environment variable #5091

Closed
WilliamVenner opened this issue Aug 29, 2022 · 7 comments

Comments

@WilliamVenner
Copy link
Contributor

Describe the problem

beforeBuildCommand and beforeDevCommand claim to be for conditional compilation, yet offer no way of getting the target triple for building

Describe the solution you'd like

Expose the target triple as an environment variable

Alternatives considered

No response

Additional context

No response

@amrbashir
Copy link
Member

did you check https://tauri.app/v1/api/config#buildconfig.beforedevcommand there is env vars for arch, platform, ..etc

@WilliamVenner
Copy link
Contributor Author

Yes, they can't be used to build a target triple

@FabianLars
Copy link
Sponsor Member

Why not? you only need arch and os to figure out your target triple. That's of course not nearly as comfortable to use, but still not impossible.

@WilliamVenner
Copy link
Contributor Author

x86_64-windows-pc-msvc

[arch] [os] [???] [toolchain]

the last two are missing

@FabianLars
Copy link
Sponsor Member

Yes they are missing, but in the context of tauri apps, predictable.

  • windows? arch + pc-windows-msvc
  • linux? arch + unknown-linux-gnu
  • macos? arch + apple-darwin

@WilliamVenner
Copy link
Contributor Author

But then there's the issue of concatenating these strings in a cross-platform way. Now I have to resort to a scripting language or something just to concatenate these parts into a target triple.

@FabianLars
Copy link
Sponsor Member

FabianLars commented Aug 29, 2022

Yep, that's why i said it's "not nearly as comfortable to use". it's a workaround not a solution, which is why this issue is still open. In other words, we/i agree that this would be a nice addition 👍

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

3 participants