User:Fuzailm1/Servo

Servo

Servo 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 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 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 :

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

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



Step 3: replacing use of serialize crate with serde_json



Step 4: adding new constructors for the structures



Step 5: writing test cases to use the new constructors