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

Extend context.rs to dynamically find the OUT_DIR for certain assets #7534

Merged
merged 5 commits into from
Sep 11, 2023
Merged

Extend context.rs to dynamically find the OUT_DIR for certain assets #7534

merged 5 commits into from
Sep 11, 2023

Conversation

sinistersnare
Copy link
Contributor

@sinistersnare sinistersnare commented Jul 31, 2023

Hello, my team is moving to Bazel, and we can not use tauri-cli or any of your custom cargo-based tooling. We would like to contribute our changes to you all, so you can better support Bazel.

These changes should be non-breaking, as it just recalculates the OUT_DIR at build.rs-time and compile-time separately. So it should not affect Cargo builds.

I think that TODO, if this is going to be fully generalized we need to add this functionality to some other parts of at least this file.

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, and the changes were approved in issue #___
  • No

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

@sinistersnare sinistersnare marked this pull request as ready for review August 1, 2023 14:44
@sinistersnare sinistersnare requested a review from a team as a code owner August 1, 2023 14:44
@sinistersnare sinistersnare changed the title expand context.rs to dynamically find the OUT_DIR for certain assets Extend context.rs to dynamically find the OUT_DIR for certain assets Aug 2, 2023
@lucasfernog
Copy link
Member

@sinistersnare is this PR ready or do you want to change some other OUT_DIR usage?

@sinistersnare
Copy link
Contributor Author

I think its fine for now. It can be further extended as needed using the code here as a template for future contributors.

@lucasfernog
Copy link
Member

By the way @sinistersnare this PR is targeting v2. So if you want this to be part of v1.5, it needs to target the 1.x branch instead.

@sinistersnare sinistersnare changed the base branch from dev to 1.x August 14, 2023 13:53
@sinistersnare
Copy link
Contributor Author

Ah thanks for the check on that. I rebased on 1.x

@sinistersnare
Copy link
Contributor Author

I extended the PR to include another case useful to my project. Overall, this kind of stuff is really useful for non-Cargo users, and the codegen crate would be wise to generalize from any build tool.

lucasfernog
lucasfernog previously approved these changes Sep 11, 2023
@lucasfernog lucasfernog merged commit 0b0bc81 into tauri-apps:1.x Sep 11, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔎 In audit
Development

Successfully merging this pull request may close these issues.

2 participants