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

Hide Tauri integration behind feature flag #32

Closed
binarybaron opened this issue Aug 27, 2024 · 6 comments · Fixed by #37
Closed

Hide Tauri integration behind feature flag #32

binarybaron opened this issue Aug 27, 2024 · 6 comments · Fixed by #37

Comments

@binarybaron
Copy link

binarybaron commented Aug 27, 2024

We can hide the Tauri integration behind an optional tauri-integration feature flag. This would allow the swap (cli and asb) crate to be compiled without having to compile the tauri crate (meaning the library).

If our long term goal is for this fork to replace upstream, it might be beneficial.

This would fix the currently failing CI build action: https://github.com/UnstoppableSwap/xmr-btc-swap/actions/runs/10563121578/job/29262633363

@binarybaron
Copy link
Author

@Einliterflasche What do you think?

@Einliterflasche
Copy link

Long term goal should probably be that tauri compilation works... But yeah, we could do that

@binarybaron
Copy link
Author

binarybaron commented Aug 27, 2024

Regardless of the CI it does make sense to me to still be able to compile the project entirely without Tauri

@Einliterflasche
Copy link

While that would be nice it would also require us to mark every bit of code that uses tauri functions with #[cfg(feat = tauri)]`, including imports... I mean, we could do that if we manage to keep the tauri code concentrated into a few areas

@binarybaron
Copy link
Author

binarybaron commented Aug 28, 2024

We could also delegate the calling of the emit function on the tauri handle (implementation of TauriEmitter) to the src-tauri crate. That way 'swap' will only include the trait definition and will not depend on the 'tauri' crate.

@Einliterflasche
Copy link

working on it in #37

binarybaron added a commit that referenced this issue Aug 28, 2024
Introducing a feature flag in the swap crate that conditionally enables the tauri depencendy. This allows compiling the swap crate without the heavy tauri dependency. This also enables us to build arm binaries in the CI again.

This closes #32 and #34
binarybaron added a commit that referenced this issue Aug 28, 2024
Introducing a feature flag in the swap crate that conditionally enables the tauri depencendy. This allows compiling the swap crate without the heavy tauri dependency. This also enables us to build arm binaries in the CI again.

This closes #32 and #34
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 a pull request may close this issue.

4 participants
@Einliterflasche @binarybaron and others