OS2 World Community Forum
OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Glenn on October 02, 2022, 10:53:56 am
-
Hi all, On tech forums everyone is talking about Rust making it to the Linux kernel, which probably will mean more and more programs that will be Rust-based.
In the Firefox discussions, I read it was impossible to port Rust to OS/2. I’d like to better understand why, because I see that as an increasing difficulty to make OS/2 apps by porting Linux ones…
-
I just doubt how quickly the projects we have will all be swapped to the RUST compiler.
Roderick
-
I doubt, that all projects just move to Rust. People choose the languages for their projects by needs and taste. Most people just won't dump their work of years just for the hot shit of the hour.
E.g. the DOSBOX maintainers very decidely stated, they will stay with their old version of C++ (C++98).
And the linux kernel will not switch over night to Rust. BSD is more important for us anyway.
-
Hi
I share the idea that the typical developer that had spend a long time coding his software on an specific language will not change it. But if we just ignore "the shift / the wave" a different thing may happen, new developers with new ideas came and annihilates the old software. Suddenly the software we use became "legacy" and we just blind fold ourselves saying that all the new stuff is crap and all this young people are just hipsters that nobody understand.
I insist on keeping out eyes open to whatever comes that may help us and notice that things may change in the future.
Regards
-
Hi all, On tech forums everyone is talking about Rust making it to the Linux kernel, which probably will mean more and more programs that will be Rust-based.
In the Firefox discussions, I read it was impossible to port Rust to OS/2. I’d like to better understand why, because I see that as an increasing difficulty to make OS/2 apps by porting Linux ones…
Not impossible, just really hard. We use a patched (and with helper programs) GCC (Gnu Compiler Collection) along with the system linker to port/build programs.
Rust uses the LLVM toolchain, which has no support for our system so that would have to be ported, a large project for a knowledgeable compiler expert who would also need a good understanding of OS/2 internals. Given a few million dollars and luck in finding the right developer, it could be done. Probably the patches to make the port work wouldn't be accepted upstream so like our GCC, a fork would have to be maintained.
The other big problem is memory, or rather address space. It takes a lot of memory to build and link some of this stuff. We ran into a lot of problems building Firefox around version 4. There were source files that used 2 GB's of memory just to compile, doable one at a time and the linker had problems. Ilink5 stopped working and we switched to wlink, which we have the source for and that needed quite a bit of patching to link Firefox and today QT5 is barely linkable. Rust is way more memory intensive then C++, both for compiling and linking.
The linker problem could maybe worked around with spill files (think swap), be slow and once again would need an expert to do it.
Another option is cross-compiling, compile and link the code on 64bit Linux. Once again there needs to be a tool chain built to do the cross compiling.
In summary, given a large amount of money or a really inspired volunteer and the right developer, it could be done but is very unlikely.
Another solution might be if the GCC people ever have a compatible (Rust keeps changing, another problem) Rust compiler, it would be much more trivial to get that working.
As others have said, it is doubtful that Rust will spread that fast. A bigger problem is lack of support for 32 bit systems. More and more projects take it for granted that there is a 64 bit address space and they stop supporting 32 bit systems with programs expecting to be able to allocate GB's of memory at a time. I think that is what will kill OS/2 eventually, at least as far as porting modern stuff goes.
-
Hi all, On tech forums everyone is talking about Rust making it to the Linux kernel, which probably will mean more and more programs that will be Rust-based.
In the Firefox discussions, I read it was impossible to port Rust to OS/2. I’d like to better understand why, because I see that as an increasing difficulty to make OS/2 apps by porting Linux ones…
Just because some Linux kernel modules are going to use Rust doesn't mean that userland apps are going to. The only part of the Linux kernel that is used around here I believe is ALSA, so I'd think we're pretty safe. If ALSA does convert for some crazy reason, there's also OSS4 :).
-
There are projects such as https://freshman.tech/rust-coreutils/ (https://freshman.tech/rust-coreutils/) to rewrite userland stuff in Rust. Note that this is an alternative to the GNU Coreutils and currently GNU doesn't seem to plan on moving to Rust
-
Here's the Rust GCC project page, seems to be coming along and Paul likely has the skills to get it working on our platform, at least as much as possible.
https://github.com/Rust-GCC (https://github.com/Rust-GCC)
-
Hey Dave,
Here's the Rust GCC project page, seems to be coming along and Paul likely has the skills to get it working on our platform, at least as much as possible.
https://github.com/Rust-GCC (https://github.com/Rust-GCC)
Rust support is supposed to be included in GCC 13.0 - however GCC 13.0 will drop support for STABS debugging code - it remains to be seen if this can be reinstated or if we have to switch to dwarf....
Cheers,
Paul
-
Seems the Open Watcom Debugger supports dwarf, have to learn. Guess things like exceptq would need changing.
-
Open Watcom Debugger supports dwarf,
Yes. But most probably not the current version of dwarf I fear.
Beside that if you've ever used a more modern debuger (idebug, ICAT, every other debugger out in the world from this century!) you'd never want to switch back to the ancient user interface experience of wdebug.
-
Seems the Open Watcom Debugger supports dwarf, have to learn. Guess things like exceptq would need changing.
The alternative, would be to attempt to reinstate the stabs support - https://gcc.gnu.org/git/?p=gcc.git&a=search&h=HEAD&st=commit&s=stabs is a list of recent commits mentioning stabs - this looks like the main one.... https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7e0db0cdf01e9c885a29cb37415f5bc00d90c029