Remix.run Logo
riedel 3 days ago

Given that rust only works on e.g. cygwin recently (and still does not build many crates: i try to compile jujutsu and failed), this is a big blow to portability IMHO. While I try to like rust, I think making it mandatory for builds of essential tools like git is really too early.

sunshowers 3 days ago | parent | next [-]

?? I build Jujutsu and many other Rust programs from source on Windows.

Rust has a much better Windows story than C and bash do, due to its heritage as a language built by Mozilla for Firefox.

egorfine 2 days ago | parent | next [-]

> Rust has a much better Windows story than C

This is an extremely strong statement. Which is so obviously factually incorrect that I tend to think you might have meant something else.

steveklabnik 2 days ago | parent | next [-]

As a Windows user, I find random Rust projects work on Windows far more often than random C ones, even if the authors didn’t make a specific attempt to support Windows.

egorfine 2 days ago | parent [-]

"work" as in "build"? I would agree with that.

steveklabnik 2 days ago | parent [-]

And run.

My colleague Bryan Cantrill, famously a huge Unix guy, once said to me “if you had told me that projects I write would just work on Windows at the rate they do, I wouldn’t have believed you.” When I started at Oxide I had to submit like one or two patches to use Path instead of appending strings and that was it, for my (at the time) main work project.

sunshowers 2 days ago | parent | prev [-]

I meant exactly what I said.

riedel 3 days ago | parent | prev [-]

As said before I wasn't complaining about windows, but rather of not so common posix layers like cygwin [0]. Most C posix compliant stuff compiles in my experience.

[0] https://github.com/rust-lang/rust/issues/137819

sunshowers 3 days ago | parent [-]

Right, but Rust makes it so you don't have to use Cygwin. It's one of the great portability advantages of Rust that you can write real Windows programs with it.

riedel 3 days ago | parent [-]

I am not really sure if I can follow here. How could a rust compiled program like git honor my cygwin emulated mount points in paths, which I need, when working with other posix compliant software.

sunshowers 3 days ago | parent [-]

I thought that if you invoke a native Windows binary with Cygwin, it translates Unix-looking paths into Windows ones. But it's been a long time since I used Cygwin so I could be wrong.

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

Git works only on cygwin too?

Kwpolska 3 days ago | parent [-]

No, it doesn't. OP meant that the Rust support on Cygwin is bad; it is better with the native Windows API.

1718627440 5 hours ago | parent | next [-]

Git for Windows uses MSYS2, which is a mix of a Cygwin fork and MinGW, the implementation of the Win32 APIs for Linux.

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

I don't quite understand. Why use a janky, lossy Linux emulation layer when you can just target Windows natively?

GoblinSlayer 6 hours ago | parent [-]

For some reason git for windows is a cygwin build.

1718627440 5 hours ago | parent [-]

Because git expects a POSIX API and POSIX tools and also POSIX behaviour like symlinks and line-endings to do its job.

IshKebab 3 days ago | parent | prev [-]

Cygwin is an ugly hack anyway.

lame_lexem 3 days ago | parent | prev [-]

jj has msvc builds and is still tire 1 target maybe something particular about your configuration?

riedel 3 days ago | parent [-]

I want it to be cygwin native, i.e. passing calls through the cygwin posix layer and not use the windows binary. Sure I can use the windows binary, but that is a different thing.