Www.rust-lang.org: LLVM acknowledgement

Created on 18 Oct 2019  路  5Comments  路  Source: rust-lang/www.rust-lang.org

LLVM acknowledgement

Summary

Add reference to LLVM backend on the front page, because it helps to do the dirty machine code job behind the curtains.

I opened this thread on rust discussions forum, but I was suggested to redirect it here.

Motivation

I enjoy programming in Rust due to its safety and performance. However, I am also big fan of the LLVM which provides extremely important ground for many compilers. Although I am aware of work in progress regarding alternative implementation of rust compiler backend, currently the performance of rust and support of various platforms is dependent on machine code generated by LLVM backend.

Therefore I am sad not to find any notion about LLVM on the rust official web page. The only thing I was able to found is some discussion in the rustc developers guide, which regular public audience would never reach.

Drawbacks

More technical details for new comers to face on the front page

Rationale and alternatives

I am suggesting to add a reference to LLVM compiler toolbox to the rust home web page. There are several examples of how you can do it.

The Julia language web page has this text:

Julia is fast!

Julia was designed from the beginning for high performance. Julia programs compile to efficient native code for multiple platforms via LLVM.

The Apple's Swift home page tells us this:

Fast and Powerful

From its earliest conception, Swift was built to be fast. Using the incredibly high-performance LLVM compiler technology, Swift code is transformed into optimized native code that gets the most out of modern hardware. The syntax and standard library have also been tuned to make the most obvious way to write your code also perform the best whether it runs in the watch on your wrist or across a cluster of servers.

There are many others languages, which I can provide as an examples.

Maintenance

Almost no need to maintain

Unresolved Questions

The exact formulation we want to have

I hope that you will appreciate to find a solution to this case.
P.S. Disclaimer: I don't have anything to do with LLVM team, I am neither a member nor contributor.

A-Content C-Enhancement

Most helpful comment

I'm sympathetic to handing out credit where credit is due. But, and that's crucial: rust-lang.org is the Rust languages and projects website, not its implementation and not rustc. Effectively, both are one and the same.

Looking carefully, both Swift and Julia use LLVM somewhat for the advertising value. As we're not in any way fixed for using LLVM, I would not pull in LLVM so visibly.

That is not to say that we should not give credit (quite contrary). We need to make great care through to not build the connection LLVM<>rustc too strongly in the head of people.

I think it would be worth to have a separate page to give credits to the components we use.

We're also currently setting up a sponsors page, so if anyone would be interested in taking on such a task, I'll file issues later.

All 5 comments

I think whatever wording we add, it should not imply that Rust is a LLVM frontend (precisely for the reason that we want to add more backends and because e.g. things that are not UB in LLVM may be UB in Rust).

I concur with @Centril. It's great to thank/acknowledge Rust's many contributors (both direct and indirect). But:

  • Rust (the language) has no connection to LLVM. The reference implementation (rustc) uses LLVM, but that's an implementation detail (and LLVM won't always be the backend).
  • I'm not sure there's much value in name-dropping LLVM like Julia and Swift, especially on the home page.
  • Other Rust implementations aren't necessarily LLVM-based. They're not nearly as mature as the reference implementation, but I hope that someday Rust's website will mention them as alternative implementations (when they're mature enough). That would be a suitable place to explain some of the differences between the implementations (e.g., LLVM+Cranelift backend vs GCC backend), and I would find that preferable to mentioning LLVM specifically on the home page.

It would be great to see another implementations, but if I click download and install rustup I get the only one. We may want to separate the idea of safe semantics introduced in rust and the implementation details of low-level optimizations, but it is more fair to tell people what they get.

In terms of performance and target platform support, there are certain differences in what clang and gcc can do, which the key word LLVM can clarify.

By home page I mean not exactly the front page, but something like "learn more" button as well. Or somewhere in the part of rust book or rustc book which is few clicks away from the home page. Currently some LLVM related flags pop up here and there, but some introduction is missing.

We may want to mention existence of alternative implementations as well, and modify it later regarding their status.

If you run Rust code under miri or using a REPL, LLVM is not used at all. You can also compile some Rust code with Cranelift instead of LLVM using the Cranelift backend already. So there are at least ~3-4 ways of executing Rust code right now, where one uses LLVM. Since the method that uses LLVM is the default and most common way of running Rust programs, the website should probably acknowledge that, but it would be nice if the website also mentioned the other methods as well, making it clear that the Rust frontend is mostly "backend agnostic" and multiple backends exist.

I'm sympathetic to handing out credit where credit is due. But, and that's crucial: rust-lang.org is the Rust languages and projects website, not its implementation and not rustc. Effectively, both are one and the same.

Looking carefully, both Swift and Julia use LLVM somewhat for the advertising value. As we're not in any way fixed for using LLVM, I would not pull in LLVM so visibly.

That is not to say that we should not give credit (quite contrary). We need to make great care through to not build the connection LLVM<>rustc too strongly in the head of people.

I think it would be worth to have a separate page to give credits to the components we use.

We're also currently setting up a sponsors page, so if anyone would be interested in taking on such a task, I'll file issues later.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Zaechus picture Zaechus  路  5Comments

Veedrac picture Veedrac  路  5Comments

camelid picture camelid  路  4Comments

Aloso picture Aloso  路  4Comments

Manishearth picture Manishearth  路  6Comments