没有合适的资源?快使用搜索试试~ 我知道了~
用Rust开发Servo网页浏览器引擎的体验报告
3星 · 超过75%的资源 需积分: 36 52 下载量 130 浏览量
2015-06-08
16:12:24
上传
评论 3
收藏 180KB PDF 举报
温馨提示
所有现代浏览器都是用C++来编写核心的渲染引擎。Mozilla研究院启动Servo项目构建一个新的网页浏览器引擎,在保留那些浏览器引擎的功能之外,也利用了并行硬件的最新趋势且具更好的内存安全性。论文PDF,TeX等多种格式下载。推荐!
资源推荐
资源详情
资源评论
Experience Report: Developing the
Servo Web Browser Engine using Rust
Brian Anderson Lars Bergstrom
David Herman Josh Matthews
Keegan McAllister Jack Moffitt
Simon Sapin
Mozilla Research
{banderson,larsberg,dherman,jdm,
kmcallister,jack,ssapin}@mozilla.com
Manish Goregaokar
Indian Institute of Technology Bombay
manishg@iitb.ac.in
Abstract
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 pro-
grammer 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 lan-
guage, Rust, that provides us a similar level of control of the un-
derlying 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 sys-
tem, 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 encoun-
tered along the way and describe some potential areas for future
research.
1. Introduction
The heart of a modern web browser is the browser engine, which is
the code responsible for loading, processing, evaluating, and ren-
dering web content. There are three major browser engine families:
1. Trident/Spartan, the engine in Internet Explorer [IE]
2. Webkit[WEB]/Blink, the engine in Safari [SAF],
Chrome [CHR], and Opera [OPE]
3. Gecko, the engine in Firefox [FIR]
All of these engines have at their core many millions of lines of
C
++
code. While the use of C
++
has enabled all of these browsers
to achieve excellent sequential performance on a single web page,
[Copyright notice will appear here once ’preprint’ option is removed.]
on mobile devices with lower processor speed but many more pro-
cessors, these browsers do not provide the same level of interac-
tivity that they do on desktop processors [MTK
+
12, CFMO
+
13].
Further, in an informal inspection of the critical security bugs in
Gecko, we determined that roughly 50% of the bugs are use after
free, out of range access, or related to integer overflow. The other
50% are split between errors in tracing values from the JavaScript
heap in the C
++
code and errors related to dynamically compiled
code.
Servo [SER] is a new web browser engine designed to ad-
dress the major environment and architectural changes over the
last decade. The goal of the Servo project is to produce a browser
that enables new applications to be authored against the web plat-
form that run with more safety, better performance, and better
power usage than in current browsers. To address memory-related
safety issues, we are using a new systems programming language,
Rust [RUS]. For parallelism and power, we scale across a wide va-
riety of hardware by building either data- or task-parallelism, as
appropriate, into each part of the web platform. Additionally, we
are improving concurrency by reducing the simultaneous access to
data structures and using a message-passing architecture between
components such as the JavaScript engine and the rendering engine
that paints graphics to the screen. Servo is currently over 400k lines
of Rust code and implements enough of the web platform to render
and process many pages, though it is still a far cry from the over
7 million lines of code in the Mozilla Firefox browser and its as-
sociated libraries. However, we believe that we have implemented
enough of the web platform to provide an early report on the suc-
cesses, failures, and open problems remaining in Servo, from the
point of view of programming languages and runtime research. In
this experience report, we discuss the design and architecture of a
modern web browser engine, show how modern programming lan-
guage techniques — many of which originated in the functional
programming community — address these design constraints, and
also touch on ongoing challenges and areas of research where we
would welcome additional community input.
2. Browsers
Modern web browsers do not just load static pages, but can also
handle pages that have similar complexity to native applications.
From application suites such as the Google Apps
1
to games based
1
https://apps.google.com
arXiv:1505.07383v1 [cs.PL] 26 May 2015
资源评论
- zhangqianli2015-06-09一般吧,没什么用
- 幸福线2015-06-27比相关书籍介绍的详细,顶一个.
- u0109316262015-06-25一般吧,英文的我实在是不会啊
- qwe1092832015-06-11还行,要是中文的就好了
- easyinplay2015-06-23没什么用,英文不行
不叫月红
- 粉丝: 6463
- 资源: 48
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功