All modern web browsers - Internet Explorer, Firefox, Chrome, Opera, and Safari - have a core rendering engine written in C++. This language choice was made because it affords the systems programmer complete control of the underlying hardware features and memory in use, and it provides a transparent compilation model. Servo is a project started at Mozilla Research to build a new web browser engine that preserves the capabilities of these other browser engines but also both takes advantage of the recent trends in parallel hardware and is more memory-safe. We use a new language, Rust, that provides us a similar level of control of the underlying system to C++ but which builds on many concepts familiar to the functional programming community, forming a novelty - a useful, safe systems programming language. In this paper, we show how a language with an affine type system, regions, and many syntactic features familiar to functional language programmers can be successfully used to build state-of-the-art systems software. We also outline several pitfalls encountered along the way and describe some potential areas for future research.
翻译:所有的现代网络浏览器( Internet Explorer, Firefox, Firefox, Chrome, Opera, and Safari) 都有以 C++ 书写的核心配置引擎。 这种语言选择是因为它为系统程序员提供了对基本硬件特性和记忆的完整控制,并且提供了一个透明的编译模型。 Servo是在Mozilla Research 上启动的一个项目,目的是建立一个新的网络浏览器引擎,以维护这些其他浏览器引擎的能力,但两者都利用了平行硬件方面的最新趋势,并且更加安全。我们使用一种新的语言, Rust, 为我们提供了与 C++ 类似的对基本系统的控制水平, 但它以功能编程界熟悉的许多概念为基础, 形成了一种新颖的、 有用的系统编程语言。 在本文中, 我们展示了如何成功地使用一种具有亲近型系统、 区域 和许多对功能语言程序员熟悉的合成特征的语言来建立国家艺术系统软件。 我们还概述了沿路遇到的一些陷阱, 并描述未来研究的潜在领域。