Refactor(tauri): move tauri-api and tauri-updater to tauri #1455
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
fix: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
Motivated by 3 things:
Simple -> Expand
api
as a module in the beta, we are free to expand to a separate crate in the future without it being a breaking change. We cannot go fromtauri-api
->mod api
however since some projects may have an explicit dependency on thetauri-api
crate. Having the option to go either way seems the best as we see how ergonomic it can be in the future.Easier to keep track of and reduce transitive dependencies.
Easier to keep versions in sync
tauri
while having an un-upgraded version oftauri-api
if they happen to have both in their manifest. (and vice versa).Why is
tauri-utils
not included?tauri-build
/tauri-codegen
/tauri-macros
. Since this would create a circular dependency, we keep it split.tauri-utils
.In short,
tauri-utils
can be thought of as "Tauri specific things that are useful outside of the actual application". Currently this is basically the config parser/(de)serializer/token builder and the asset key parser. They are very specific to Tauri, but their output is useful in more places than just inside the application. Sometimes calledtauri-common
by a lot of crates, bututils
means basically the same thing and we already have it published.This was kept as non-changing as possible because it's already a 1500 line diff. I think the items exported right now are probably fine, as it's basically what it was before - although maybe we refine it in the future. Also, I think some type aliases exported at the crate root like
ApiError
andUpdaterError
are useful instead of havingcrate::Error
,crate::api::Error
,crate::updater::Error
. It's currently mostly readable but adding those aliases in the future wont be a breaking change :)This is something I wanted to explore the benefits of, so I figured I would PR it so it wasn't some "maybe" thing.