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: change cargo lib and bin path to enable build on WSL #827

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

michidk
Copy link
Contributor

@michidk michidk commented Nov 3, 2024

The project cannot be cross-compiled on Linux, because the file paths are in a format which is supported by Windows only:

[lib]
path = "src\\lib.rs"

[[bin]]
name = "glazewm"
path = "src\\main.rs"

Changing \\ to / fixes the issue and works both, on Linux and on Windows.

Motivation: My whole developer workflow is on WSL. My typical workflow is to build on WSL and then test on Windows.

How to build glazewm on Ubuntu:

(assuming this patch is applied and nightly is setup already)

  1. Install dependencies: sudo apt-get update; sudo apt-get install libgtk-3-dev librust-atk-dev
  2. Add windows (gnu) target: rustup target add x86_64-pc-windows-gnu
  3. Finally, build the project: cargo build --target x86_64-pc-windows-gnu

@lars-berger lars-berger changed the title fix: Fix cargo lib path to enable to build on Linux fix: change cargo lib and bin path to enable build on WSL Nov 5, 2024
@lars-berger lars-berger merged commit 45a9255 into glzr-io:main Nov 5, 2024
5 checks passed
@michidk michidk deleted the build-on-linux branch November 5, 2024 17:36
Copy link

🎉 This PR is included in version 3.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 3.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants