Remix.run Logo
bloppe 3 days ago

Actually, the Rust toolchain makes cross-compiling way easier than any other fully-compiled language I've ever used. There are like 100 different platforms you can target by just setting the `--target` flag, and they all pretty much just work on any host platform.

Sounds like the real issue is that some Git developers have ancient, rigid requirements for their own development machines.

pdpi 3 days ago | parent | next [-]

> Actually, the Rust toolchain makes cross-compiling way easier than any other fully-compiled language I've ever used

Zig takes the crown on that one, to the point that some people use Zig to cross-compile Go projects with CGo dependencies.

wyldfire 3 days ago | parent [-]

The way Zig solves this problem "better" than Rust is by claiming the target libraries as part of its distribution and building those on demand. It makes for a really excellent experience cross-building.

Rust might have a harder time if it wanted a corresponding feature because it doesn't natively build C like Zig does (using libclang). Either it would have to start using libclang or ship with rust re-implementations of the C library. AFAIK it's impossible to write the C++ library in Rust though.

dabinat 3 days ago | parent | prev | next [-]

That has not been my experience. I develop on Windows and need to compile for Linux. After spending several hours trying to get cross-compilation working, I gave up and do it via WSL now.

I switched from Go and I feel like Go was much better at this than Rust.

(I tried “cross” but it was very slow and I found it faster to rsync the files inside the container and then run the build scripts)

yencabulator 3 days ago | parent [-]

I'd bet the difference is that Go has a default assumption that everything is reimplemented in Go and calling C is awkward and slow, meanwhile lots of low-level Rust libraries are actually just type-safety wrappers over C libraries.

saltcured 3 days ago | parent | prev | next [-]

Others have said Rust does not support NonStop.

But, my point is you shouldn't even have to cross-compile Git to a platform like NonStop in order to develop NonStop apps. So the portability of Rust shouldn't even matter here. The app developer should be able to run their Git commands on a supported platform and cross-compile their own app to NonStop.

Ambroisie 3 days ago | parent [-]

I haven't double checked, but my recollection of that story was that they were using Git as part of the operations at runtime, not (just) as a development dependency.

leftyspook 3 days ago | parent [-]

Ah, I see Tom the Genius has moved on from using Subversion for his enterprise JSON DSL

cogman10 3 days ago | parent | prev [-]

A good example of it is how easy it is to do WASM from rust. WASM is even one of the harder platforms to target with rust.