Cobalt is a lightweight application container (i.e. an application runtime, like a JVM or the Flash Player) that is compatible with a subset of the W3C HTML5 specifications. If you author a single-page web application (SPA) that complies with the Cobalt Subset of W3C standards, it will run as well as possible on all the devices that Cobalt supports.
The Cobalt Authors originally maintained a port of Chromium called H5VCC, the HTML5 Video Container for Consoles, ported to each of the major game consoles, designed to run our HTML5-based video browse and play application. This took a long time to port to each platform, consisted of 9 million lines of C++ code (before we touched it), was dangerous to modify without unintended consequences, and was thoroughly designed for a resource-rich, multi-process environment (e.g. a desktop, laptop, or modern smartphone).
These constraints (not intended to be a canonical list) make this device spectrum vastly different from the desktop computer environment targeted by Chromium, FireFox, and IE:
The Cobalt Authors forked H5VCC, removed most of the Chromium code -- in particular WebCore and the Chrome Renderer and Compositor -- and built up from scratch an implementation of a simplified subset of HTML, the CSS Box Model for layout, and the Web APIs that were really needed to build a full-screen SPA browse and play application.
The Cobalt technology stack has these major components, roughly in a high-level application to a low-level platform order:
Cobalt is like a flaky layered pastry - perhaps Baklava. It shouldn't be too difficult to rip the Web Implementation and Layout off the top, and just use the Renderer, or even to just use Base + Starboard + GLES2 as the basis of a new project.
Oh, we got both kinds of HTML tags,
See the Cobalt Subset specification for more details on which tags, properties, and Web APIs are supported in Cobalt.
More to come.
All source locations are specified relative to
src/ (this directory).
base/- Chromium's Base library. Contains common utilities, and a light platform abstraction, which has been superceded in Cobalt by Starboard.
net/- Chromium's Network library. Contains enough infrastructure to support the network needs of an HTTP User-Agent (like Chromium or Cobalt), an HTTP server, a DIAL server, and several abstractions for networking primitives. Also contains SPDY and QUIC implementations.
cobalt/- The home of all Cobalt application code. This includes the Web Implementation, Layout Engine, Renderer, and some other Cobalt-specific features.
cobalt/build/- The core build generation system,
gyp_cobalt, and configurations for supported platforms. (NOTE: This should eventually be mostly moved into
cobalt/media/- Chromium's Media library. Contains all the code that parses, processes, and manages buffers of video and audio data. It send the buffers to the SbPlayer implementation for playback.
starboard/- Cobalt‘s porting layer. Please see Starboard’s
README.mdfor more detailed information about porting Starboard (and Cobalt) to a new platform.
third_party/- Where all of Cobalt‘s third-party dependencies live. We don’t mean to be perjorative, we love our third-party libraries! This location is dictated by Google OSS release management rules...
third_party/starboard/- The location for third-party ports. This directory will be scanned automatically by gyp_cobalt for available Starboard ports.
Here's a quick and dirty guide to get to build the code on Linux.
depot_tools into your favorite directory. It has been slightly modified from Chromium's
git clone https://cobalt.googlesource.com/depot_tools
Add that directory to the end of your
Ensure you have these packages installed:
sudo apt-get install libgles2-mesa-dev libpulse-dev libavformat-dev \ libavresample-dev libasound2-dev libxrender-dev libxcomposite-dev
Ensure you have the standard C++ header files installed (e.g.
For now, we also require ruby:
sudo apt-get install ruby
Remove bison-3 and install bison-2.7. (NOTE: We plan on moving to bison-3 in the future.)
$ sudo apt-get remove bison $ sudo apt-get install m4 $ wget http://ftp.gnu.org/gnu/bison/bison-2.7.1.tar.gz $ tar zxf bison-2.7.1.tar.gz $ cd bison-2.7.1 $ sh configure && make && sudo make install $ which bison /usr/local/bin/bison $ bison --version bison (GNU Bison) 2.7.12-4996
(From this directory) run GYP:
cobalt/build/gyp_cobalt -C debug linux-x64x11
ninja -C out/linux-x64x11_debug cobalt
httpshost that doesn't have a certificate validatable by our set of root CAs, you must pass the
--ignore_certificate_errorsflag to the Cobalt command-line.
cobalt/browser/switches.ccfor more command-line options.
Cobalt has four build optimization levels, going from the slowest, least optimized, with the most debug information at the top (debug) to the fastest, most optimized, and with the least debug information at the bottom (gold):
When building for release, you should always use a gold build for the final product.
$ cobalt/build/gyp_cobalt -C gold linux-x64x11 $ ninja -C out/linux-x64x11_gold cobalt $ out/linux-x64x11_gold/cobalt
This is a fork of the chromium repository at http://git.chromium.org/git/chromium.git