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

fix for non-windows target cross compile on windows #394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chidea
Copy link

@chidea chidea commented Nov 15, 2024

Before:
Cargo-leptos was finding .exe file after building server when cross compiling to non-windows targets which does not use .exe extensions at all.

After:
This commit fixes it to use .exe extension only when the target machine is also windows.

Error log:
Error: at D:\a\cargo-leptos\cargo-leptos\src\compile\server.rs:40:22 Caused by:
0: at D:\a\cargo-leptos\cargo-leptos\src\service\site.rs:117:44
1: Could not read "target\aarch64-unknown-linux-gnu\wasm-release\leptos.exe" at D:\a\cargo-leptos\cargo-leptos\src\ext\fs.rs:44:10
2: No such file or directory (os error 2)

Before:
Cargo-leptos was finding .exe file after building server when cross compiling to non-windows targets which does not use .exe extensions at all.

After:
This commit fixes it to use .exe extension only when the target machine is also windows.

Error log:
Error: at `D:\a\cargo-leptos\cargo-leptos\src\compile\server.rs:40:22`
Caused by:
    0: at `D:\a\cargo-leptos\cargo-leptos\src\service\site.rs:117:44`
    1: Could not read "target\\aarch64-unknown-linux-gnu\\wasm-release\\leptos.exe" at `D:\a\cargo-leptos\cargo-leptos\src\ext\fs.rs:44:10`
    2: No such file or directory (os error 2)
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.

1 participant