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

Update build documentation #12

Merged
merged 1 commit into from
May 11, 2023
Merged

Update build documentation #12

merged 1 commit into from
May 11, 2023

Conversation

ofek
Copy link
Owner

@ofek ofek commented May 11, 2023

Also documented the cross compilation temporary limitation cross-rs/cross#1215

@ofek ofek merged commit c7d4c32 into master May 11, 2023
@ofek ofek deleted the b branch May 11, 2023 19:38
cargo build --release
```

The executable will be located at `target/release/pyapp.exe` if on Windows or `target/release/pyapp` otherwise. If a particular [target](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget) has been set then the `release` directory will be nested one level deeper under `target/<TARGET>`.
Copy link

@Emilgardis Emilgardis May 11, 2023

Choose a reason for hiding this comment

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

This is not correct, when cargo is invoked with --target it unconditionally puts it in target/<triplet/..., and cross will always specify the target even if you call cross build without a specific target.

Copy link
Owner Author

Choose a reason for hiding this comment

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

On Windows when I run cargo build --release --target x86_64-pc-windows-msvc I get:

Screenshot 2023-05-11 155824

Screenshot 2023-05-11 155942

Copy link
Owner Author

Choose a reason for hiding this comment

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

So I should change it to say "if a target has been set or if cross is used"?

Copy link

@Emilgardis Emilgardis May 11, 2023

Choose a reason for hiding this comment

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

Yes.

You should be getting a warning though if your default on windows is msvc or you try to use msvc, without having a custom image

[cross] warning: `cross` does not provide a Docker image for target x86_64-pc-windows-msvc, specify a custom image in `Cross.toml`.
[cross] note: Falling back to `cargo` on the host.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Fixed, thank you! 1384865

ofek added a commit that referenced this pull request May 11, 2023
EnigmaGlimmer added a commit to EnigmaGlimmer/Python_app that referenced this pull request Mar 15, 2024
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.

2 participants