Yew install failed, gnu vs msvc?

Hallo hallo.
I am new to Rust and hope someone can answer a few stupid questions.
I want to test out Yew and did the following as suggested on the website:

cargo install trunk

I got the error:

error: failed to run custom build command for `ring v0.16.20`

I tried a few things and ended up getting the solution by:

rustup default x86_64-pc-windows-msvc

The error messages kept complaining about gcc.exe not being found (even when my other Rust projects compile).
So my questions are:

  • What is the difference between x86_64-pc-windows-gnu and x86_64-pc-windows-msvc from a user perspective?
  • Which toolchain do Rust users use on Windows? I saw that Rustup show indicated 3 toolchains on my device.
  • I have no idea why changing the default from nightly gnu to stable msvc solved my problem?

Sorry for the noob question, I come from Python and don't work with build tools.

Any comments would be appreciated.

It may not be a GNU vs MSVC problem then, but a nightly vs stable one. Nightly is expected to have bugs. You can confirm or falsify this theory by seeing if nightly MSVC or stable GNU works (I have no idea based on just this much information).

Essentially, other than the obvious difference of compilers, gnu links to the old-and-lame msvcrt.dll, while msvc links to the hot-and-sexy ucrt.dll.

You might have some slightly worse performance or different (better or worse!) security, but generally the difference is really about what libraries you are linking to expect, and whether you are ok with the licensing requirements of the VC build tools (though there's some noise about Microsoft fixing that?)

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.