Live data from Hacker News

Cobalt – a stripped down Chromium for apps, Linux and embedded systems

cobalt.dev

41–50 of 55 posts

Re: Cobalt – a stripped down Chromium for apps, Linux and embedded systems

#41
post #7

Earlier quoted context omitted.

> But binary has ~45mb ... Even this is too much I think. Sciter is 7 Mb on Windows and 11 Mb on RaspberryPi. Extra 3 Mb is Skia for rendering on Vulkan and/or OpenGL. And it supports full set of HTML5 elements. JavaScript is at full ES2020 level. The only reason I think why 45 Mb is there is because of video codecs. Sciter does not have them in core. But as loadable ffmpeg based plugin.

Thanks I will check Sciter! I almost forgot, Cobalt has a very well designed porting layer. Therefore, it is relatively easy to run it on custom Linux embedded devices. It also uses Skia as a backend for rasterization. As many people here have already written Cobalt is designed as a youtube player, but it can be successfully used for other purposes.

Sciter works on Windows, MacOS, Linux, Android and is packaged in two forms: windowed and windowless engines (a.k.a. headless).

It supports rendering trough Direct2D/DirectX, GDI+, CoreGraphics, Cairo and (through Skia) DX12, Vulkan, Metal.

Re: Cobalt – a stripped down Chromium for apps, Linux and embedded systems

#42
post #12

I wonder how this compares to something like Ultralight. https://ultralig.ht/

Ultralight has proprietary components you cannot statically link to.

Yes but what about binary size and memory usage?

Re: Cobalt – a stripped down Chromium for apps, Linux and embedded systems

#43

Cobalt is the primary engine that's used for running YouTube and YouTube TV on set-top boxes and smart TVs. If you notice that it looks the same on a Roku device or a Fire TV stick or a Samsung TV, that's because all of those are running a port of Cobalt and a special version of the YouTube website.

The special version of YouTube TV is accessible still by changing your user-agent: https://news.ycombinator.com/item?id=28945542

Re: Cobalt – a stripped down Chromium for apps, Linux and embedded systems

#44

Cobalt is the primary engine that's used for running YouTube and YouTube TV on set-top boxes and smart TVs. If you notice that it looks the same on a Roku device or a Fire TV stick or a Samsung TV, that's because all of those are running a port of Cobalt and a special version of the YouTube website.

that explains why it is "striped down" but still havefull DRM support.

https://html5test.com/s/f95f2b5e8ee2ce08.html

no form elements tho?!?

Re: Cobalt – a stripped down Chromium for apps, Linux and embedded systems

#45
post #35

Earlier quoted context omitted.

Cobalt isn't a great fit for general-purpose web browsing because it only supports a subset of HTML--lots of websites would appear broken. It's really meant for webapps you've designed with Cobalt in mind. Check out the supported features: https://cobalt.dev/development/reference/supported-features....

That… sounds absolutely amazing. Very specific purpose yes but wow, the amount of times I've needed a stripped down HTML engine that doesn't suck. I suspect this could make an excellent renderer for an app doing markdown previews, CHM files, ebooks and such for example.

no though ;-(

Re: Cobalt – a stripped down Chromium for apps, Linux and embedded systems

#46
post #32

Earlier quoted context omitted.

Sciter supports flex units but not flexbox. Flex units (and grid layouts) are in Sciter since 2007, ~10 years before browsers got them. Flexibility is the must for desktop UIs so it was in the engine from the very beginning. Sciter's flex units + CSS flow property is a superset of flexbox and grid features. For example paddings, margins, border widths, left|right|top|bottom can be expressed in flex units. Everything…

Sciter does not support CSS Flexbox. It supports a more or less equivalent, but incompatible feature. That's a critical distinction when you want to run the same codebase as you have on the web.

CSS was designed for running on different UAs and there is special mechanism built in it. If you take a look into source of that demo page, you will see:

   /* browser */
   @supports (display:flex)  
   {
     section { display: flex; }
     section > * { flex: 1; margin:1em; } 
     ...  
   }

   /* sciter */
   @supports (flow:horizontal)
   {
     section { flow:horizontal; }
     section > * { width:1*; margin:1em; }
     ...
   }
You should not assume that all browsers support same set of features. And needless to say, that Sciter is not a universal browser. And so is Cobalt in that respect - it is a browser for particular site / application.

Re: Cobalt – a stripped down Chromium for apps, Linux and embedded systems

#48
post #23

Earlier quoted context omitted.

> 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. So it's based on Chromium, but pretty far from it at this point.

"Based on Chromium" implies that the core rendering code that comprises Chromium is in this codebase, but this is not at all the case if you browse the source. Basically the only thing that this codebase shares with Chromium is a build system and some very low-level libraries (libbase, which is basically a standard library for C++)

It was forked from Chromium and there may be parts that are still pulled from the upstream.

Re: Cobalt – a stripped down Chromium for apps, Linux and embedded systems

#50
post #35

Earlier quoted context omitted.

strange question...but if you were to create a new mobile browser for android (with some custom features), would you recommend Chromium or Cobalt ?

Cobalt isn't a great fit for general-purpose web browsing because it only supports a subset of HTML--lots of websites would appear broken. It's really meant for webapps you've designed with Cobalt in mind. Check out the supported features: https://cobalt.dev/development/reference/supported-features....

Can you get Cobalt to return an error status "HTML outside of supported subset - need full browser", for applications where you need a fast-launching embedded browser?

Is there some tool for evaluating pages for "will they run in Cobalt"?

I can see uses for this if you can do that. If you can't, it's limited to sites designed for it.

Post reply on HN