rust-lang / rustc_codegen_cranelift

Cranelift based backend for rustc
Apache License 2.0
1.52k stars 94 forks source link

Add Rustup installation instructions to README #1421

Closed Kobzol closed 7 months ago

Kobzol commented 7 months ago

Now that cranelift is distributed with Rustup, I find myself constantly searching for the https://github.com/rust-lang/rust/pull/81746 PR. I think that it would be useful to also describe the Rustup installation/usage instructions here in README.

lqd commented 7 months ago

https://bjorn3.github.io/2023/10/31/progress-report-oct-2023.html describes the way to use the backend via Cargo.toml in order to not change the compilation commands (and also via cargo's env vars), which could be interesting here as well.

lqd commented 7 months ago

Maybe we should also mention it in https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times or https://nnethercote.github.io/perf-book/compile-times.html

lqd commented 7 months ago

And also document this in the unstable book.

Kobzol commented 7 months ago

Added more usage instructions based on the blog post. Also sent PRs to the perf book (https://github.com/nnethercote/perf-book/pull/72).

I'm not sure if the unstable book is the correct place for this, as it contains just general descriptions of compiler flags. I think that the Rustc book might be more appropriate.

bjorn3 commented 7 months ago

The actual text of the new section looks good to me. It feels a bit weird to have using precompiled versions from rustup first, then manual building and finally using precompiled versions from CI though.

Kobzol commented 7 months ago

I agree. I think that it makes sense to have the easiest way first though. What order would you prefer?

bjorn3 commented 7 months ago

Maybe swap building it yourself and using the CI artifacts? You would need to reword using the CI artifacts for that as it is currently written as alternative for building yourself.

Kobzol commented 7 months ago

I tried to reorganize it a little bit.

bjorn3 commented 7 months ago

Thanks!