4 ms·
Link to the talk - https://www.youtube.com/watch?t=2611&v=8T6ClX-y2AE https://www.youtube.com/watch?t=2611&v=8T6ClX-y2AE (timestamped to the part about Rust) T
by nindalf 4y ago
Link to the talk - https://www.youtube.com/watch?t=2611&v=8T6ClX-y2AE https://www.youtube.com/watch?t=2611&v=8T6ClX-y2AE (timestamped to the part about Rust)
The speaker covers a bunch of areas and the final part of the talk (around 10 minutes) is about Microsoft introducing Rust in some self-contained areas in Windows.
Some highlights:
- Their focus is on "killing bug classes". More context in this post by Microsoft Research from 2019 - A proactive approach to more secure code.
- They want to do this with memory safe languages, CPU architectural changes and safer language subsets. This talk focussed on memory safe languages, specifically Rust.
- First area they've introduced Rust in - a cross platform rewrite of a font parser called DWriteCore. The team reported that parsing was "incredibly easy". Font shaping performance increased by 5-15% compared to the C++ version.
- It took about 2 devs working for half a year to complete this. The speaker says this is pretty good value for an area that is notorious for security bugs.
- Second area is the REGION data type in Win32k GDI. Currently in consumer Windows, disabled by feature flag. Will be enabled in insider builds soon. Performance has been good, some small wins for the Rust version.
- There is now a Windows SysCall implemented in completed safe Rust.
TLDR - Rust is inside the Windows Kernel, will be enabled widely soon.
- bonzini 4y agoNote that this is high-level GUI stuff and GDI is only in the kernel due to old decisions made in the early 1990s (Windows NT 3.5).
- AntonCTO 4y ago> Font shaping performance increased by 5-15% compared to the C++ version. Personally, I wouldn't link it directly to rust, but to rewriting. When you develop something, you usually can't account for all future changes that affect performance, design, LOC, robustness, and so on. But with rewrite, you take them all into account. So there is a big chance that rewrite will be superior in many areas. It will probably have the same effect as if they had rewritten it in C++ again.
- bobnamob 4y agoIsn’t this exactly contrary to what second system syndrome would have us believe?
- AntonCTO 4y agoI am not sure if I can associate it with a rewrite. Can you elaborate a bit?
- leftyspook 4y agoIn this case it isn't a "in every way better second system designed from the ground up to include a kitchen sink", it's just an API-compatible rewrite in a different language.
- DougBTX 4y agoYes, but it is normal for sayings like that to have contradictory versions, so that one is available in any situation. For example: "Too many cooks spoil the broth" vs. "Many hands make light work" "Look before you leap" vs. "He who hesitates is lost"
- ClumsyPilot 4y agoOr for a single daying to have antithetical interpretations: 'It's just a few bad apples" vs "one bad apple spoils the barrel" Or "blood is thicker than water" can mean you prioritise family. But the full saying is actually "blood of the covenant is thicker than water of the womb" and means opposite
- tialaramex 4y agoI've never heard that "full saying" and Wikipedia says that people who claim this offer no citations for it. One of them is a 9/11 Conspiracy Theorist, the other listed is from one of the crazier than average US religious sects.
- deleted 4y ago[deleted]
- ace2358 4y agoRegarding fonts, I feel like when I modded my original Xbox as a teen, it was done using malicious font files on the hdd for the Xbox dashboard haha.