CSC/ECE 517 Spring 2017/M1701: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Created page with "== Introduction == <big>'''Servo'''</big> Servo<ref>https://en.wikipedia.org/wiki/Servo_(layout_engine)</ref> is a research project with the aim of creating a web browser layou...")
 
No edit summary
Line 52: Line 52:


== References ==
== References ==
<references/>

Revision as of 01:39, 23 March 2017

Introduction

Servo

Servo<ref>https://en.wikipedia.org/wiki/Servo_(layout_engine)</ref> is a research project with the aim of creating a web browser layout engine written in Rust, being developed by Mozilla Research. The prototype of the system currently seeks to create a highly parallel environment in which many components are handled by fine-grained, isolated components. Servo provides a consistent API for hosting the engine within other software.Servo is still at an early stage of development. Servo can act as a standalone browser.

Rust

Rust<ref> https://en.wikipedia.org/wiki/Rust_(programming_language)</ref> is a general purpose, multi-paradigm, programming language sponsored, developed, and maintained by Mozilla Research for creating highly concurrent and highly safe systems. The development of Rust had an emphasis on control of memory layout, safety, and concurrency. It is very similar to C++ in terms of syntax but differs heavily in its semantics.

Project Description

The repository www.github.com/servo/rust-har[1] is a library which implements HAR 1.2 spec in Rust. It was last changed two years ago and our task involved making it adhere to the syntax of the latest version of rust.

The primary purpose of our contribution to the project was to add native support for the feature that enables the creation of HTTP archive files which can be analyzed by other tools. The addition of this feature to Servo allows more precise comparisons to be made with other browsers. Our primary steps while working on the project involved<ref>https://github.com/servo/servo/wiki/HTTP-archive-support-project</ref>:

clone the rust-har repository and update the code to build with a modern version of Rust:

  • remove/replace invalid integer suffixes
  • replace box expressions with Box::new syntax
  • replace use of serialize crate with serde_json
  • add a new constructor for the Timing/CacheEntry/Cache/Content/Entry/Request/Response/Cookie/Header structures
  • make the tests use the new constructor methods (cargo test)
  • add TravisCI integration

Design Pattern

No design pattern was needed/used in this project.

Implementation

We have completed the above steps, and following are some of the snippets of code that were added or altered.

Step 1: removing/replacing invalid integer suffixes

removing/replacing invalid integer suffixes
removing/replacing invalid integer suffixes

Step 2: replacing box expressions with Box::new syntax

replacing box expressions with Box::new syntax
replacing box expressions with Box::new syntax

Step 3: replacing use of serialize crate with serde_json

replacing use of serialize crate with serde_json
replacing use of serialize crate with serde_json

Step 4: adding new constructors for the structures

adding new constructors for the structures
adding new constructors for the structures

Step 5: writing test cases to use the new constructors

writing test cases to use the new constructors
writing test cases to use the new constructors

References

<references/>