Mozilla

mozilla

Mozilla Research Projects

Rust is a new programming language for developing reliable and efficient systems. It's designed to support concurrency and parallelism in building platforms that take full advantage of modern hardware. Its static type system is safe and expressive and it provides strong guarantees about isolation, concurrency execution and memory safety.

Rust combines powerful and flexible modern programming constructs with a clear performance model to make program efficiency predictable and manageable. One important way it achieves this is by allowing fine-grained control over memory allocation through contiguous records and stack allocation. This control is balanced with the absolute requirement of safety: Rust’s type system and runtime guarantee the absence of data races, buffer overflow, stack overflow or access to uninitialized or deallocated memory.

Servo is an experimental project to build a Web browser engine for a new generation of hardware: mobile devices, multi-core processors and high-performance GPUs. With Servo, we are rethinking the browser at every level of the technology stack — from input parsing to page layout to graphics rendering — to optimize for power efficiency and maximum parallelism.

Servo builds on top of Rust to provide a secure and reliable foundation. Memory safety at the core of the platform ensures a high degree of assurance in the browser’s trusted computing base. 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.

Following on the success of pdf.js, a high-fidelity PDF renderer written in pure HTML and JavaScript, the Shumway project aims to implement an emulator for the Flash multimedia platform. Shumway combines rendering techniques pioneered by the open source Gordon emulator with a just-in-time (JIT) compiler for the Actionscript Virtual Machine that generates optimized JavaScript.

Shumway’s primary goals are to demonstrate the power and expressiveness of the HTML5 platform and to discover and remedy gaps in the Web platform.

Emscripten is an open source optimizing compiler for LLVM applications that generates pure JavaScript to run directly on the Web. Emscripten makes it possible to take C and C++ programs and convert them automatically to Open Web applications with no plugins or extensions.

Emscripten demonstrates that the Web is capable of supporting the responsive, real-time user experiences of interactive desktop software, including games, simulations and even live video decoding. Many applications run within an order of magnitude of their native binary performance. At the same time, Emscripten serves to diagnose and address performance bottlenecks in the Web platform to keep pushing the boundaries of tomorrow’s Web.

sweet.js is an extension and precompiler to JavaScript providing hygienic macros — that is, user-extensible syntax — similar to those of the Scheme or Rust programming languages. User-extensible syntax empowers programmers to provide their own extensions to JavaScript, without requiring new standardization and changes to built-in JavaScript engines. Macros also make it possible for programmers to mix and match extensions from multiple libraries, without having to use multiple precompilers.

LLJS is an extension and precompiler to JavaScript for writing low-level, high-performance code with tight control over memory layout and computation style. The compiler generates code similar to Emscripten, but provides a bridge for writing and integrating low-level, performance-intensive code with high-level, idiomatic JavaScript.

broadway.js

Broadway is a pure JavaScript and HTML decoder of the H.264 video compression format. Broadway uses high-performance JavaScript and <canvas> rendering techniques to get smooth, real-time playback of high quality videos. The goal of this project is to push the limits of the Web's computation and graphics performance.

Parallel JavaScript is an ongoing initiative to unlock the full potential of modern hardware and expose this power to JavaScript programmers in safe and usable ways. The first major project is a joint effort with Intel Research to implement the proposed ECMAScript data parallelism API, which provides an array data structure with high-level data manipulation operations that can often be compiled to execute on multicore, vector and even GPU computation units.

The asm.js project is an attempt to formally specify the subset of the JavaScript language that is generated by compilers like Emscripten and LLJS. By precisely formalizing and defining the language, optimizing JavaScript engines like Mozilla's SpiderMonkey can recognize code generated by these compilers and provide additional optimization. Our goal is to demonstrate that JavaScript engines can provide near-native performance on code generated by tools like Emscripten.