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
Refactor(tauri): move tauri-api and tauri-updater to tauri #1455
Conversation
We currently have a pending feature request to compile the |
That's an interesting use case, but I don't think this will complicate it any more than it would need to be at that point anyways. We currently do a lot of I/O and some threading in the api, so we would effectively need to write another backend for it. Maybe when the time comes, the I/O agnostic api could be moved back out into |
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.