this post was submitted on 25 Aug 2024
109 points (97.4% liked)

Rust

6005 readers
4 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] solrize@lemmy.world 7 points 2 months ago (9 children)

In principle you could start from hand assembly. Look up "sectorlisp" as a lowest level option. Or you could start from Forth, which is traditionally implemented using very simple methods. The blog post really doesn't make clear what problem the author is trying to solve. It gives some general description but leaves a lot to be guessed at.

Then there is the question of where the CPU is supposed to come from. Any modern one was designed using lots of mysterious CAD tools. Maybe scrounge a vintage Z80 out of an old Timex-Sinclair or something?

[–] BatmanAoD@programming.dev 6 points 2 months ago (7 children)

The author doesn't explain exactly what their interest in bootstrapping is, but the goal is pretty explicit:

So, for me, it would be really nice if there was a Rust compiler that could be bootstrapped from C. Specifically, a Rust compiler that can be bootstrapped from TinyCC, while assuming that there are no tools on the system yet that could be potentially useful.

[–] sugar_in_your_tea@sh.itjust.works 3 points 2 months ago (3 children)

It seems it would be a lot easier to work on the GCC compiler, and work with others to bootstrap GCC (if it hasn't already been done). Getting the GCC Rust compiler able to compile some version of rustc probably wouldn't be that hard, and then you can just use that version to compile up the chain to modern Rust.

[–] BatmanAoD@programming.dev 2 points 2 months ago (1 children)

That's the mrustc project the author mentions. He wants Rust to be bootstrapped earlier in the process.

[–] sugar_in_your_tea@sh.itjust.works 2 points 2 months ago (1 children)

Sure, but I guess I don't really understand the argument. Why would Rust need to be involved earlier in the process? Isn't the point to have a way to compile rustc completely from source?

I guess it's cool to have multiple ways to get there, but that project would take way less work and get to the same end goal. It sounds to me like the author is trying to justify a cool project instead of trying to solve a real problem. That's completely fine, but I think most people would be happy with the mrustc project.

[–] BatmanAoD@programming.dev 3 points 2 months ago

I asked, and it's to replace some of the bits that require Perl: https://hachyderm.io/@notgull/113035157972265244

You can see the full (current) sequence here: https://bootstrapping.miraheze.org/wiki/Live-bootstrap

load more comments (1 replies)
load more comments (4 replies)
load more comments (5 replies)