You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: 2024/2024-12-monthly-report.org
+58-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,61 @@ Thanks again to [[https://opensrcsec.com/][Open Source Security, inc]] and [[htt
8
8
9
9
*** Project update
10
10
11
-
We accomplished a lot of technical changes during the month of December on three major milestones for the compiler: Auto traits, for-loops, and built-in derives. Both for-loops and built-in derives required a major rework of our AST and HIR in order to handle lang-item paths, a special form of path expressions and path types used when refering directly to [[https://rustc-dev-guide.rust-lang.org/lang-items.html][lang-items]]. This had a big impact to most of the compiler pipeline, as we had to adapt most compiler passes to handle these new paths.
11
+
This month of development was focused on three major milestones of compiler development: auto traits, built-in macros and for-loops, which are all important in order to compile ~core 1.49~ and later, the Rust-for-Linux project.
12
+
13
+
The most widely known auto traits in Rust may be [[https://doc.rust-lang.org/nomicon/send-and-sync.html][Send and Sync]], which are used all throughout the Rust standard library to indicate thread-safety. As such, these traits are often used in trait-bounds to restrict sharing behavior to thread-safe objects:
Part of our pipeline was missing proper handling for these automatic trait bounds, which now enables us to build this code properly. Two missing features remain for properly handling these special bounds:
51
+
52
+
1. Extra trait bounds can only be automatic traits
53
+
54
+
2. Implementing Send and Sync properly
55
+
56
+
We accomplished a lot of technical changes during the month of December on three major milestones for the compiler: Auto traits, for-loops, and built-in derives.
57
+
58
+
- Mention why they're important?
59
+
- Mention how they're used throughout core and std?
60
+
- Mention why we needed to do a rework of our lang items?
61
+
- Explain what lang items are
62
+
- why can't we use ::core::option::Option::Some?
63
+
- How this differs from rustc?
64
+
65
+
Both for-loops and built-in derives required a major rework of our AST and HIR in order to handle lang-item paths, a special form of path expressions and path types used when refering directly to [[https://rustc-dev-guide.rust-lang.org/lang-items.html][lang-items]]. This had a big impact to most of the compiler pipeline, as we had to adapt most compiler passes to handle these new paths.
12
66
13
67
*TODO*: Explain why lang item paths are needed for for-loops, with examples.
14
68
@@ -18,6 +72,9 @@ Path of the into_iter function:
18
72
19
73
Once the lang-item fixes were completed, we were able to finish implementing for-loops desugaring, which is currently under review. This then lead to continuing work on built-in derive macros, the last remaining block for macro expansion for core 1.49. These built-in macros often need to refer to other lang-items, such as the ~Clone~ or ~Copy~ trait in order to be expanded properly.
20
74
75
+
- Explain auto traits
76
+
- Explain what remains and how we're going to implement it
77
+
21
78
We then focused on setting up the basis for the ~Sync~ and ~Send~ auto-traits, which are used throughout core 1.49 and required for many Rust programs. We are now figuring out the last few details of implementing these auto-traits and will add handling for them in the coming weeks.
0 commit comments