33 comments
@notgull "Which is fine for us users, since we can just download rustc from the internet and use it." Yeah, some of us don't have the luxury of downloading and running arbitrary unsigned binaries from the internet. Makes the security folks nervous for some reason... Glad to see that this is coming along! I'm excited for another way to bootstrap Rust. @notgull If one of your goals is to compile Rust itself, which is the main point of mrustc, how is Rust's LLVM dep being handled? Don't get me wrong, I would love to get rid of it, just based on the fact it's 10 million lines of C++, arguably the only language more complex to write a compiler for than Rust. But we don't have that luxury :/. @notgull Does Cranelift do optimizations? I've heard conflicting info about this ("it doesn't optimize", "it does optimize, but debug-friendly opts only, no further opts planned", "release opts are planned/in progress"). @notgull Actual no-optimization builds of rustc are so slow that config.toml itself says they're unsupported. Hopefully getting an acceptable speed compiler doesn't require LLVM-like levels of effort (i.e. 80% of the speed for 20% of the work). Anyways, if you succeed in this project, I will have to find something else to bit- err, nothing left to bitch about- wrt rustc's bootstrap situation, so I do hope its feasible, and that e.g. upstream (if QBE is required) and Cranelift are supportive :D. @notgull This is OT, but while its on my mind... Is GH Discussions a reasonable place to ask questions about design decisions about smol? (Specifically, I have a lifetime question, and can't figure it out for the life of me) If this is designed primarily for bootstrapping purposes, are you planning to pick a particular version of Rust that'll let you compile some early self-hosting Rust compiler to shorten the bootstrap chain and stop there, so that you don't have a moving target?
@notgull I like it. I really want the moral equivalent of TinyCC but for [a subset of] Rust, but having a "TinyRust" written in C is also great. @notgull i don't think using bison/yacc or C++ is a sin for bootstrapping, IMHO, so it can be a lot easier on yourself. the bootstrapping use cases I'd care about are "i have a unix environment with gcc and full dev environment, just without rutstc" (i..e a distro or a port of rust to like, aix) more than "i am keying linux in from switches" @notgull Have you considered having Dozer compile an intermediate language that is similar to rust but not full rust and then implement the actual rust compiler in that intermediate language? That would follow the "Descent Principle" you describe in your blog post and probably be easier than doing the entire compiler in C. @oli @notgull it's not the main goal of the project, but https://github.com/FractalFir/rustc_codegen_clr/ has some support for C codegen. It's where I'd start if we wanted to put some extra effort on this. @BatmanAoD Not really. Mostly I want to replace the Perl bootstrap that happens in the process @notgull @BatmanAoD In saw another attempt to replace perl but without rust. Somebody is trying to write autotools in C. @BatmanAoD @notgull Well, one simple example might be using uutils instead of coreutils. Or findutils in rust... @notgull Good luck! How much have you looked into the implementation of a trait solver, out of interest? I'll bet that's likely going to be the most complex element of the project. |
@notgull That's awesome!