guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: website: Add post about Rust bootstrapping.


From: Danny Milosavljevic
Subject: 01/01: website: Add post about Rust bootstrapping.
Date: Tue, 11 Dec 2018 09:54:41 -0500 (EST)

dannym pushed a commit to branch master
in repository guix-artwork.

commit b826cc5c707c2199a3255679d3250b13e816f9ad
Author: Danny Milosavljevic <address@hidden>
Date:   Tue Dec 11 15:52:14 2018 +0100

    website: Add post about Rust bootstrapping.
    
    * website/posts/bootstrapping-rust.md: New file.
---
 website/posts/bootstrapping-rust.md | 82 +++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/website/posts/bootstrapping-rust.md 
b/website/posts/bootstrapping-rust.md
new file mode 100644
index 0000000..f6d820f
--- /dev/null
+++ b/website/posts/bootstrapping-rust.md
@@ -0,0 +1,82 @@
+title: Bootstrapping Rust
+date: 2018-12-11 14:36
+author: Danny Milosavljevic
+tags: Bootstrapping, Reproducible builds
+---
+Slowly, systems programming languages are getting better in the sense
+of giving more guarantees and automating what can be automated without
+downsides.
+
+Rust is one of the more promising system programming languages.  Its
+central advantage is that it enforces memory safety and thread safety
+at compile time, without incurring any runtime overhead.
+
+The part that enforces memory safety is called "the borrow checker".
+
+It has been a long-standing tradition to develop a language far enough
+to be able to write the language's compiler in the same language, and
+Rust does the same.  Rust is nowadays written in Rust.
+
+We've tracked down the earlier Rust versions, which were written
+in OCaml, [1] and were planning to use these to bootstrap Rust.
+But in parallel, John Hudge (Mutabah) developed a Rust compiler,
+called "mrustc", written in C++ [2].
+
+mrustc is now good enough to compile rust 1.19.0.
+
+We now got a bootstrap chain like this:
+
+    address@hidden
+        ^
+        |
+    address@hidden
+        ^
+        |
+    address@hidden
+        ^
+        |
+    address@hidden
+        ^
+        |
+    address@hidden
+        ^
+        |
+    address@hidden
+        ^
+        |
+    address@hidden
+        ^
+        |
+    address@hidden
+        ^
+        |
+    address@hidden
+        ^
+        |
+    address@hidden
+        ^
+        |
+       g++
+
+#### Limitations
+
+* mrustc currently does no borrow checking -- so memory safety
+of our rust 1.19.0 is mostly guaranteed in the sense of "someone else
+built rust 1.19.0 using another Rust compiler and thus ran the borrow
+checker already".
+
+* The bootstrap chain is rather long.  There are plans to extend
+mrustc to support newer Rust, but it turned out to be difficult.
+
+* Rust takes reproducible builds seriously, but there are some
+reproducibility problems left in earlier compilers that pop up
+very sporadically (mostly because of LLVM, and some because of
+Rust hashtable poisoning).  Help wanted, especially from LLVM
+people!
+
+* Each target we want to support has to have support in LLVM,
+AND mrustc needs to have a specification of the alignment and
+sizes of the base types.
+
+[1]: 
https://github.com/rust-lang/rust/commit/ef75860a0a72f79f97216f8aaa5b388d98da6480
+[2]: https://github.com/thepowersgang/mrustc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]