Skip to content

rust-toolchain.toml forces windows-gnu which causes skia-bindings build script to fail #794

@EndilWayfare

Description

@EndilWayfare

This is only an issue when cloning and using the freya workspace directly. I have been using freya as a dependency for a bit, and that initial experience was painless and seamless. However, if anyone running examples or setting up to contribute on Windows will likely run into this problem.

This is a known limitation with rust-toolchain.toml, apparently. rust-lang/rustup#3546
My default toolchain is stable-msvc, but the override file pinning the channel explicitly to "1.79.0" (and/or whatever it will be set to in the future) selects 1.79.0-x86_64-pc-windows-gnu. I tried to explicitly install 1.79.0-x86_64-pc-windows-msvc toolchain, but it still overrides to windows-gnu.

It seems that the root issue is that rust-skia only supports pre-built binaries for x86_64-pc-windows-msvc target. First, it failed with a cryptic error about symlink failure (easily solved by turning on "Developer Mode" in Windows settings), but then ninja started failing with some deep-in-the-weeds build errors.

I could probably debug the build problems, but it was more immediately easy to just temporarily disable rust-toolchain.toml. Doing this, the examples built and ran without issue. I will likely put more effort into figuring this out when I get a chance, since I'd like to contribute to the project at some point.

I don't know what the best ultimate "fix" is here, but it's probably worth adding a small section to the README with a heads-up about this wrinkle and how to work around it.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions