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

Always use system curl by default when building utoipa-swagger-ui #1045

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Always use system curl by default when building utoipa-swagger-ui #1045

merged 1 commit into from
Sep 11, 2024

Conversation

cyqsimon
Copy link
Contributor

Also fixes #1044

@cyqsimon
Copy link
Contributor Author

It seems to me that the original author of this code assumed conditional compilation within the build script (#[cfg]/cfg!()) and the environment variables presented to the build script at runtime (CARGO_CFG_*) can be used interchangeably, whereas in reality there is a semantic difference that becomes important in cross-compilation.

I haven't bothered scrutinizing other parts of build.rs (or for that matter, the build script of other crates), but I suspect there could be similar oversights too. Maybe this is something worth looking over.

Copy link
Owner

@juhaku juhaku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, it is much cleaner as so. 🎉

@juhaku
Copy link
Owner

juhaku commented Sep 11, 2024

I haven't bothered scrutinizing other parts of build.rs (or for that matter, the build script of other crates), but I suspect there could be similar oversights too. Maybe this is something worth looking over.

Sure if you see it worthwhile. (Though other crates does not have any build scripts as of this moment). The cross platform support is mainly relied on community support. Since I am only a linux user. And some choises I have made is based only on assumption of how it suppose to work 😅

@juhaku juhaku merged commit 78656b6 into juhaku:master Sep 11, 2024
10 checks passed
@cyqsimon cyqsimon deleted the cross-compile-buildrs-fix branch September 11, 2024 15:14
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 this pull request may close these issues.

utoipa-swagger-ui: cross compile to Windows on Linux fails
2 participants