Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

barracuda156

macrumors 68040
Original poster
Sep 3, 2021
3,610
2,078
rust.png
 
Really incredible! Will test on Tiger once it is ready for the main tree.

The issue is that mrustc itself and rustc for it are in a single port, and while mrustc is functional, FWIW, rustc fails to build, on all archs (I tried x86_64 and arm64) and with different errors, which is annoying, to say the least LOL
And I am hesitant to commit a half-fixed port.

I will probably try to fix 1.54 for LLVM-7, because if that works, we know for sure that at least on x86 bootstrapping worked fine. While re 1.39 I am not sure it ever worked for anyone at all (not in MacPorts, but whether upstream tested it on macOS and in what set-up).
 
  • Like
Reactions: Forest Expertise
BTW, if we have someone here who knows Rust and its build process on some common platform, please get in touch, since what I am currently having the most problem with are issue unrelated to powerpc as such.
 
The issue is that mrustc itself and rustc for it are in a single port, and while mrustc is functional, FWIW, rustc fails to build, on all archs (I tried x86_64 and arm64) and with different errors, which is annoying, to say the least LOL
And I am hesitant to commit a half-fixed port.

I will probably try to fix 1.54 for LLVM-7, because if that works, we know for sure that at least on x86 bootstrapping worked fine. While re 1.39 I am not sure it ever worked for anyone at all (not in MacPorts, but whether upstream tested it on macOS and in what set-up).
Quite reasonable. I also suspect 1.54 will allow a lot more software in Rust to work. I am glad llvm-powerpc is now fixed for Tiger, so whenever mrustc and rustc are ready for the main tree, Tiger is ready for them.
 
Well, it took 4 days to fix one bug which was added in 1.54 and another bug which was fixed later (as it turned out), but was unfixed in 1.39 and 1.54 – and was driving me mad. The issue itself was trivial, but finding it was a pain.
Now it cannot figure out that powerpc-apple-darwin10.8.0 (which is what LLVM uses, but it accepts non-versioned triple as well) is the same as powerpc-apple-darwin...

rustc.png


P. S. Don't buy into the Rust Faith. It is slow and got bugs. The only reason to deal with this is that some upstreams are determined to force rust onto everyone, leaving no choice.
 
Ok, here is a reproducible [hopefully] example of an actual Rust app running on powerpc. Assuming you have PPCPorts installed:

Code:
sudo port -v sync
sudo port -v -N install mrustc
sudo port -v -N install git
git clone https://github.com/p-e-w/ternimal
cd ternimal
vi ternimal.rs

That opens the source file for editing. Press `i` to allow editing. Comment out lines 720-721 like this (or just delete them):
Code:
//        assert!(0.0 <= start && start < TWO_PI);
//        assert!(0.0 <= end && end < TWO_PI);
Press `:wq` and Enter to save changes. (You can do this step in a code editor of choice, of course, like BBEdit etc.)

Now compile and run:
Code:
mrustc ternimal.rs
./ternimal

tenimal.png


Try the same with options, and described in README here: https://github.com/p-e-w/ternimal

ternimal2.png


You need a modern terminal emulator to have correct rendering.
`mlterm-minimal` port works. `sakura` should work too (X11).

In iTerm2, MacTerm and Apple Terminal rendering is weird, but it still works.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.