News for hackers. Stuff that matters.
Re:Astral by toyg on Tuesday April 18, 2023 @04:18PM (#35619430)
I actually cursed Maturin a few years ago, as it refused to compile on OpenBSD and hence broke some lib I planned to use.

Python is becoming a bit too reliant on Rust. Rust is good but, in term of portability, is just not as mature as C. If your lib relies on Rust, please please please test it on something beyond Linux and Mac.

Re:Astral by criddell on Tuesday April 18, 2023 @05:50PM (#35620813)
> please test it on something beyond Linux and Mac

That’s asking a lot. If your platform is poorly supported by Rust, then maybe that’s where your efforts should be directed. If you fix that, lots of interesting stuff beyond one library is unlocked.

Re:Astral by senko on Tuesday April 18, 2023 @06:10PM (#35621084)
Theo de Raadt engaging the Rust community would be a sight to behold :)
Re:Astral by steveklabnik on Tuesday April 18, 2023 @06:29PM (#35621322)
I am not aware of him saying anything about Rust beyond this: https://marc.info/?l=openbsd-misc&m=151233345723889&w=2

Which doesn't mean he hasn't, of course!

Re:Astral by robocat on Tuesday April 18, 2023 @07:43PM (#35622101)
That email (from Dec 2017) ends with “Such ecosystems come with incredible costs. For instance, rust cannot even compile itself on i386 at present time because it exhausts the address space.”. I presume Theo is actually complaining about using more than 3 GB (?) of memory, but still it really shows the different cost-versus-benefit decisions that we all make.
Re:Astral by steveklabnik on Tuesday April 18, 2023 @07:52PM (#35622202)
Yes. My recollection is that around that time, llvm and/or rustc itself would sometimes go over that. I don't know off the top of my head what memory usage looks like right now.
Re:Astral by jeffparsons on Wednesday April 19, 2023 @01:10AM (#35624472)
Is it actually reasonable to expect compiler toolchains to work on old or underpowered hardware? Or is the real problem that cross-compilation is still a special case, rather than being the only way compilers work? If it wasn't still normal to depend on your target environment being the same as your build host, would anyone really want to do serious development work directly on their RPi/Gameboy/watch/whatever, just because that is the target runtime environment?
Re:Astral by robocat on Wednesday April 19, 2023 @02:52AM (#35625082)
I am wildly guessing that Theo’s beef is more that rust uses a lot of memory (paraphrase: 640kb should be enough for anybody). OpenBSD does integration builds on a variety of different systems, and maybe Theo noticed the OpenBSD/386 build failing due to lack of necessary memory?
Re:Astral by jeffparsons on Wednesday April 19, 2023 @05:11AM (#35626026)
That seems a reasonable guess, but it brings me straight back to wondering why such a diversity of build environments is necessary or useful. And my wild guess is that it's mostly because cross compilation is still a second class citizen in most languages today. Though I guess it could be a kind of cultural expectation that you should be able to compile the whole OS on the hardware you're running it on.
Re:Astral by steveklabnik on Wednesday April 19, 2023 @01:27PM (#35630863)
My understanding is that the policy of the project is that the base system must not be cross compiled. My understanding of why is that they want to be able to fully bootstrap from base itself.
Re:Astral by thayne on Wednesday April 19, 2023 @07:26AM (#35626863)
The rust compiler runs on i86, the complaint is that it can't compile the rust compiler, because it uses more memory than is addressable on i86.
Re:Astral by criddell on Wednesday April 19, 2023 @12:55PM (#35630482)
That’s what the person was getting at. Does it matter if it can be cross-compiled elsewhere?
Re:Astral by steveklabnik on Wednesday April 19, 2023 @01:26PM (#35630839)
It matters to Theo, due to policies created for specific objectives. It does not matter to many other people.
Re:Astral by jeffparsons on Wednesday April 19, 2023 @10:56PM (#35635835)
I guess at the end of the day this is all that really matters. If there are specific goals that Theo has around this, then there's no point in me second-guessing whether those are "reasonable"; it's a matter of values and preferences and whatever.

Whereas if this conversation was about something with broader stewardship, like _Linux_, I'd be saying this is silly, you shouldn't be compromising other things just so you can build your RPi kernel on an RPi.

Re:Astral by senko on Thursday April 20, 2023 @08:28AM (#35638936)
I think latchin onto this example misses the crux of his raitonale:

> In OpenBSD there is a strict requirement that base builds base. So we cannot replace any base utility, unless the toolchain to build it is in the base.

> Such ecosystems come with incredible costs.

Basically, the cost of adding rust to the OpenBSD base system currently far outweights the proposed benefits (reimplement fileutils), especially considering people will probably not want to pour in the effort needed to rewrite those with strict POSIX compliance (which is another requirement).

He's not saying rust isn't useful but that it wouldn't be a net benefit to have a hard dependency on it in the base system. In the BSD world folks take a very strict and conservative view of what can go in base (and for good reason IMHO).

This is different from the GP comments about just making it possible to use rust programs/libraries in OpenBSD, so we're definitely on a tangent here.

Re:Astral by Aeolun on Tuesday April 18, 2023 @06:38PM (#35621415)
> please please please test it on something beyond Linux and Mac

Why? Simply because you use something that even 95% of the unix folk do not?

I can totally see how they wouldn’t be concerned with that. Just as I’m not concerned with making my JS lib work for those weirdos that still run IE 5.5.

Re:Astral by ohgodplsno on Wednesday April 19, 2023 @05:21AM (#35626099)
>If your lib relies on Rust, please please please test it on something beyond Linux and Mac.

No, thank you, I'll just add Windows. Your choice to use platforms that nobody else does save for a few specialists does not constitute a need on my part to support your favorite. In the same way that if I package for Debian, Ubuntu and RHEL, it's your problem that it's not on Arch or unsupported by your custom Hannah Montana Linux. Feel free to submit PRs though.