CSC/ECE 517 Fall 2014/OSS M1450 vda: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Undo revision 90755 by Nkdalmia (talk))
Line 21: Line 21:
== Window.sessionStorage ==
== Window.sessionStorage ==


= Session Storage Implementation =
= Developer Environment Setup =
 
=== Installing Required Packages for Servo ===
 
On Debian-based Linuxes:
 
sudo apt-get install curl freeglut3-dev \
    libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
    msttcorefonts gperf g++ cmake python-virtualenv \
    libssl-dev libglfw-dev
 
On Fedora:
 
sudo yum install curl freeglut-devel libtool gcc-c++ libXi-devel \
    freetype-devel mesa-libGL-devel glib2-devel libX11-devel libXrandr-devel gperf \
    fontconfig-devel cabextract ttmkfdir python python-virtualenv expat-devel \
    rpm-build openssl-devel glfw-devel cmake
pushd .
cd /tmp
wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec
rpmbuild -bb msttcorefonts-2.5-1.spec
sudo yum install $HOME/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm
popd
 
On Arch Linux:


== Step 1 ==
sudo pacman -S base-devel git python2 python2-virtualenv mesa glfw ttf-font cmake


As a first step we need to build the servo browser engine. Visit [https://github.com/servo/servo Servo] page and make sure you have completed the pre requisite step.
=== Building Servo ===


Then clone the servo browser using
Clone the Servo repository hosted at https://github.com/servo/servo.


<pre>
<pre>
Line 33: Line 57:
</pre>
</pre>


And in order to build the Servo browser, go to the servo directory and give the below command.  
Switch to the servo directory and invoke mach to build Servo.


<pre>
<pre>
Line 40: Line 64:
</pre>
</pre>


<I>Note: Make sure Rust is installed before building Servo. Building the servo browser engine will take a considerable amount of time. </I>
<I>Note: Building the servo browser engine will take a considerable amount of time. </I>


When the build is successful, you can test whether your browser is working perfectly by using htis command
Once the build is successful, launch the browser using below command.


<pre>
<pre>
Line 50: Line 74:
SNAPSHOT OF SERVO BROWSER ENGINE
SNAPSHOT OF SERVO BROWSER ENGINE


= Session Storage Implementation =
   
   
== Step 2 ==
== Step 2 ==

Revision as of 20:50, 29 October 2014

Implement Window.sessionStorage

This wiki page contains details on the work done for the initial step of the task Implement Window.sessionStorage for the Mozilla research project Servo.

Introduction

Rust

Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems <ref> http://doc.rust-lang.org/nightly/intro.html </ref>. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.

Rust’s lightweight task mechanism also promises to allow fine-grained isolation between browser components, such as tabs and extensions, without the need for expensive runtime protection schemes, like operating system process isolation. <ref> https://www.mozilla.org/en-US/research/projects/ </ref>

Servo

Mozilla Research team is currently working on an experimental project to develop a new Web browser engine "Servo", that is capable of supporting a variety of current and next generation of hardware like mobile devices, multi-core processors and high-performance GPUs. Servo builds on top of Rust to provide a secure and reliable foundation. It is currently developed on 64 bit devices.<ref> https://www.mozilla.org/en-US/research/projects/ </ref>

The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. <ref> https://www.mozilla.org/en-US/research/projects/ </ref>

Window.sessionStorage

Developer Environment Setup

Installing Required Packages for Servo

On Debian-based Linuxes:

sudo apt-get install curl freeglut3-dev \

   libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
   msttcorefonts gperf g++ cmake python-virtualenv \
   libssl-dev libglfw-dev

On Fedora:

sudo yum install curl freeglut-devel libtool gcc-c++ libXi-devel \

   freetype-devel mesa-libGL-devel glib2-devel libX11-devel libXrandr-devel gperf \
   fontconfig-devel cabextract ttmkfdir python python-virtualenv expat-devel \
   rpm-build openssl-devel glfw-devel cmake

pushd . cd /tmp wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec rpmbuild -bb msttcorefonts-2.5-1.spec sudo yum install $HOME/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm popd

On Arch Linux:

sudo pacman -S base-devel git python2 python2-virtualenv mesa glfw ttf-font cmake

Building Servo

Clone the Servo repository hosted at https://github.com/servo/servo.

git clone https://github.com/servo/servo

Switch to the servo directory and invoke mach to build Servo.

cd servo
./mach build

Note: Building the servo browser engine will take a considerable amount of time.

Once the build is successful, launch the browser using below command.

./mach run tests/html/about-mozilla.html

SNAPSHOT OF SERVO BROWSER ENGINE

Session Storage Implementation

Step 2

Now, we have the servo browser engine in our machine. In order to implement Window.sessionStorage we need to add two files - an interface WEB IDL file and the implementation file

  • Create a new file called Storage.webidl file under the specified folder components/script/dom/webidls. This file contains the basic information about the methods that will be used in the storage.rs file.
  • Next, create another file called storage.rs file under the specified folder components/script/dom. This file contains the actual implementation of the sessionStorage. It has the basic methods for the creation of a storage object.
  • Now we have to add our module to lib.rs file so that the build file knows that there is a new file that has been added.
  • Build the servo once again and test to see if the servo browser is running perfectly.

FEW SNAPSHOTS

Design Patterns

We can use a delegation pattern here.

Future Implementations

Local Storage will be implemented in the future project.

References

<references/>