Rust vs clang vs windows compatibility


#1

I fear rust with clang might have ongoing compatibility problems with current and future Windows OS versions.

Rust uses clang, which as of 2015 no longer supports Windows XP or Vista. Hence neither does rust. What is the likelihood the same thing happens with Windows 7 in, say, 5 years, then Windows 10 in another 5 years, and so on? Are customers of software written in rust going to have to worry that it has a limited lifetime?

Does anyone know if there were strong technical reasons for clang not to support XP and Vista? The reason given seemed to be that there were easier constructs that Windows 7 and above provides that makes writing for clang much easier. Given the natural advances of technology, will that not also be true every few years as each new MS version, with its new bells and whistles, gets put into the Windows OS?

Has clang dropped support for any current versions of Linux/BSD?

Does Mozilla plan to look into any other base for libraries, or is clang planned for the life of rust?

Thanks


#2

Note: Not an expert.

First, Rust doesn’t use or depend on clang in any way. You’re confusing clang with the backend it uses: LLVM.

Second, you’re confusing LLVM supporting a platform as a host, and a platform as a target. As I understand it, XP will no longer be supported as a host (i.e. you can’t run LLVM on it), but will still be supported as a target (i.e. you can generate code to run on it).

Given that Firefox still has more people on XP than all versions of Linux put together, and Mozilla wants to use Rust components in Firefox, it’s highly likely that Rust will support targeting XP for a while.


#3

Rust uses clang, which as of 2015 no longer supports Windows XP or Vista. Hence neither does rust.

Rust uses LLVM, which still targets XP. Therefore Rust programs run on XP. However you obviously can’t use newer Win32 functions.

You also can’t the Rust compiler on XP, and the Rust compiler isn’t guaranteed to run on XP. But you shouldn’t be doing your dev work on XP anyways.

Given the natural advances of technology, will that not also be true every few years as each new MS version, with its new bells and whistles, gets put into the Windows OS?

I’ve never seen Windows add a single “bell” or “whistle” that didn’t already exist on another platform (typically Unix or Plan 9) for more than 10 years. With very rare exceptions, “new features” in windows don’t affect LLVM’s targeting.

Has clang dropped support for any current versions of Linux/BSD?

LLVM has never dropped support for any version of Linux or BSD that it ever targeted.


#4

That makes sense, and relieves a lot of fears.

Thanks

On 11/30/2015 10:21 PM, DanielKeep wrote:

DanielKeep

December 1

Note: Not an expert.

First, Rust doesn't use or depend on clang in any way. You're confusing clang with the backend it uses: LLVM.

Second, you're confusing LLVM supporting a platform as a host, and a platform as a target. As I understand it, XP will no longer be supported as a host (i.e. you can't run LLVM on it), but will still be supported as a target (i.e. you can generate code to run on it).

Given that Firefox still has more people on XP than all versions of Linux put together, and Mozilla wants to use Rust components in Firefox, it's highly likely that Rust will support targeting XP for a while.

To respond, reply to this email or visit https://internals.rust-lang.org/t/rust-vs-clang-vs-windows-compatibility/2951/2 in your browser.


Previous Replies

mnooninm

November 30

I fear rust with clang might have ongoing compatibility problems with current and future Windows OS versions.

Rust uses clang, which as of 2015 no longer supports Windows XP or Vista. Hence neither does rust. What is the likelihood the same thing happens with Windows 7 in, say, 5 years, then Windows 10 in another 5 years, and so on? Are customers of software written in rust going to have to worry that it has a limited lifetime?

Does anyone know if there were strong technical reasons for clang not to support XP and Vista? The reason given seemed to be that there were easier constructs that Windows 7 and above provides that makes writing for clang much easier. Given the natural advances of technology, will that not also be true every few years as each new MS version, with its new bells and whistles, gets put into the Windows OS?

Has clang dropped support for any current versions of Linux/BSD?

Does Mozilla plan to look into any other base for libraries, or is clang planned for the life of rust?

Thanks


To respond, reply to this email or visit https://internals.rust-lang.org/t/rust-vs-clang-vs-windows-compatibility/2951/2 in your browser.

To unsubscribe from these emails, visit your user preferences.

To stop receiving notifications about this particular topic, click here.


#5

I think the only optional dependence on clang can happen during the rustc build process but I can’t remember the configure option OTOMH.


#6

The Rust runtime is in part written in C, so you need a C compiler for building. This can optionally be clang.


#7

The Rust standard library is entirely written in Rust. It doesn’t have a runtime bit written in C anymore although it does depend on a few other libraries which are written in C such as compiler-rt and jemalloc. Also rustc depends on LLVM which is written in C++.


#8

Not quite.

https://github.com/rust-lang/rust/blob/master/src/rt/rust_builtin.c


#9

Oh, Windows is the only platform that exists in my mind. If you include non-windows platforms then yes there is a runtime bit written in C but there’s a PR open to get rid of it.