Getting started
Stay organized with collections
Save and categorize content based on your preferences.
Cobalt is a lightweight HTML5/CSS/JS application container that is designed
to provide a rich application development environment with minimal resource
consumption (deployment size, RAM, CPU, GPU). At the same time, Cobalt enables
a rich, low-latency user experience across a wide variety of platforms and
devices.
Target audiences
Cobalt's documentation is written with two audiences in mind:
Porters enable Cobalt to work on other platforms by using Starboard,
Cobalt's porting layer and OS abstraction, to implement the
platform-specific functionality that Cobalt uses. Each Starboard module
(memory, socket, thread, etc.) defines functions that must be implemented
for the porter's platform.
Developers want to build applications in familiar environments with
advanced debugging tools without having to worry about compatibility with
a highly fragmented set of browsers. At the same time, they want to have
full control over their codebase so that they can ship features for
constrained platforms, like TVs, on time and without technical risk.
Benefits of Cobalt
Cobalt significantly reduces the cost of supporting a browser on non-standard
and resource-constrained platforms. In addition, since Cobalt operates at a
consolidated, versioned platform abstraction layer, its porting effort is
man-weeks, and subsequent rebases are near-free.
These are some other benefits that Cobalt provides:
More platforms
- Cobalt does not require platforms to support JIT compilation and can
run on platforms that disallow execution of dynamically generated code.
- Cobalt is a single-process application and does not rely on the ability
to spawn multiple processes.
- Cobalt precompiles a set of shaders that are sufficient to express all
graphical effects, thereby accommodating platforms that cannot compile
shaders at runtime.
- Cobalt requires a compliant C++11 compiler, allowing it to reach
platforms with toolchains that don't support the newest C++17 features.
Small footprint
- Cobalt is optimized for memory. Its surface cache never exceeds a
predefined budget, and it never creates duplicate layers, reducing
the likelihood of out-of-memory crashes.
- Cobalt's small binary is designed to take up as little space as
possible. By supporting a subset of HTML5/CSS/JS, Cobalt's reduced
package size even allows bundling of CJK fonts on low-end devices.
Reduced input latency
- Cobalt produces consistent 60FPS animations by only supporting
animation of properties that don't affect layout, like
transform
,
and always running animations on a separate thread.
- Cobalt is optimized to run on single-core CPUs, resulting in better
input latency since the renderer and resource loader do not compete
with layout operations.
- On platforms that support GLES2, Cobalt avoids CPU painting by
performing almost all rendering operations on the GPU.
Getting started
Porters
Porters should begin with the porting guide,
which explains how to use Starboard, Cobalt's porting layer, to customize the
platform-specific functionality that Cobalt uses. There are several reference
documents to help porters customize configuration files and to implement
module-specific functionality. The Testing with
NPLB document provides an overview of
Starboard's compliance test suite.
Developers
Developers can follow the setup instructions for
Linux or
RasPi to set up their Cobalt development
environment, clone a copy of the Cobalt code repository, and build a Cobalt
binary. The Cobalt support
guide lists the HTML elements, CSS properties, CSS selectors, and JavaScript Web
APIs that developers can use in their Cobalt applications.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eCobalt is a lightweight HTML5/CSS/JS application container designed for minimal resource consumption while providing a rich user experience across various platforms.\u003c/p\u003e\n"],["\u003cp\u003eIt benefits developers with familiar environments and advanced debugging tools, and porters through Starboard, its porting layer for platform customization.\u003c/p\u003e\n"],["\u003cp\u003eCobalt offers advantages such as compatibility with platforms lacking JIT compilation or dynamic code execution, a small footprint optimized for memory, and reduced input latency.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can build applications leveraging Cobalt's support for specific HTML, CSS, and JavaScript features, while porters can customize platform functionality via Starboard.\u003c/p\u003e\n"],["\u003cp\u003eGetting started involves following platform-specific setup instructions and utilizing the provided documentation for porting and development.\u003c/p\u003e\n"]]],["Cobalt is an HTML5/CSS/JS container optimized for resource-constrained platforms. **Porters** implement platform-specific functionality using Starboard, Cobalt's porting layer, following the porting guide. **Developers** build applications using a subset of HTML5/CSS/JS, supported by the Cobalt guide, after setting up the environment. Cobalt's benefits include broad platform compatibility without JIT compilation, a small memory footprint, and reduced input latency with consistent 60FPS animations. Cobalt allows the use of precompiled shaders and doesn't rely on spawning multiple processes.\n"],null,["Cobalt is a lightweight HTML5/CSS/JS application container that is designed\nto provide a rich application development environment with minimal resource\nconsumption (deployment size, RAM, CPU, GPU). At the same time, Cobalt enables\na rich, low-latency user experience across a wide variety of platforms and\ndevices.\n\nTarget audiences\n\nCobalt's documentation is written with two audiences in mind:\n\n- **Porters** enable Cobalt to work on other platforms by using Starboard,\n Cobalt's porting layer and OS abstraction, to implement the\n platform-specific functionality that Cobalt uses. Each Starboard module\n (memory, socket, thread, etc.) defines functions that must be implemented\n for the porter's platform.\n\n- **Developers** want to build applications in familiar environments with\n advanced debugging tools without having to worry about compatibility with\n a highly fragmented set of browsers. At the same time, they want to have\n full control over their codebase so that they can ship features for\n constrained platforms, like TVs, on time and without technical risk.\n\nBenefits of Cobalt\n\nCobalt significantly reduces the cost of supporting a browser on non-standard\nand resource-constrained platforms. In addition, since Cobalt operates at a\nconsolidated, versioned platform abstraction layer, its porting effort is\nman-weeks, and subsequent rebases are near-free.\n\nThese are some other benefits that Cobalt provides:\n\n- **More platforms**\n\n - Cobalt does not require platforms to support JIT compilation and can run on platforms that disallow execution of dynamically generated code.\n - Cobalt is a single-process application and does not rely on the ability to spawn multiple processes.\n - Cobalt precompiles a set of shaders that are sufficient to express all graphical effects, thereby accommodating platforms that cannot compile shaders at runtime.\n - Cobalt requires a compliant C++11 compiler, allowing it to reach platforms with toolchains that don't support the newest C++17 features.\n- **Small footprint**\n\n - Cobalt is optimized for memory. Its surface cache never exceeds a predefined budget, and it never creates duplicate layers, reducing the likelihood of out-of-memory crashes.\n - Cobalt's small binary is designed to take up as little space as possible. By supporting a subset of HTML5/CSS/JS, Cobalt's reduced package size even allows bundling of CJK fonts on low-end devices.\n- **Reduced input latency**\n\n - Cobalt produces consistent 60FPS animations by only supporting animation of properties that don't affect layout, like `transform`, and always running animations on a separate thread.\n - Cobalt is optimized to run on single-core CPUs, resulting in better input latency since the renderer and resource loader do not compete with layout operations.\n - On platforms that support GLES2, Cobalt avoids CPU painting by performing almost all rendering operations on the GPU.\n\nGetting started\n\nPorters\n\nPorters should begin with the [porting guide](/youtube/cobalt/docs/starboard/porting),\nwhich explains how to use Starboard, Cobalt's porting layer, to customize the\nplatform-specific functionality that Cobalt uses. There are several reference\ndocuments to help porters customize configuration files and to implement\nmodule-specific functionality. The [Testing with\nNPLB](/youtube/cobalt/docs/starboard/testing) document provides an overview of\nStarboard's compliance test suite.\n\nDevelopers\n\nDevelopers can follow the setup instructions for\n[Linux](/youtube/cobalt/docs/development/setup-linux) or\n[RasPi](/youtube/cobalt/docs/development/setup-raspi) to set up their Cobalt development\nenvironment, clone a copy of the Cobalt code repository, and build a Cobalt\nbinary. The [Cobalt support](/youtube/cobalt/docs/development/reference/supported-features)\nguide lists the HTML elements, CSS properties, CSS selectors, and JavaScript Web\nAPIs that developers can use in their Cobalt applications."]]