0

I'm looking for open-source web browser (code/library, not compiled application) written in C or C++ for an embedded (microcontroller) application. In the end it will need to run over HTTPS, and it will need at least basic Javascript support. (A separate engine for Javascript is acceptable, as long as it can be interfaced to such.) I will be connecting to a custom display, so I will need to interface my display to the rendering engine. I do not need CSS, frames, input boxes, or anything else beyond basic HTML rendering (and Javascript control over the DOM). I have about 100kB RAM and 1MB flash available.

I expect that I'm not the first person to do this and would rather join an existing open-source project than reinvent the wheel. Can anyone suggest one? I'm really struggling to find anything appropriate.

3
  • Do you need mouse support or not? Also, not XHTML nor advanced HTML5 features I guess?
    – Nicolas Raoul
    Jun 1, 2018 at 8:24
  • What is the size of the display? For instance is it a kind of smartwatch, or a desktop computer sized display, or something else?
    – Nicolas Raoul
    Jun 1, 2018 at 8:26
  • Resolution around 250x150, display only (no user input). I'll write a short description of the solution I came up with as an answer below in case it helps someone else, although it ended up not being HTML, so a real Answer to my original question it is not. Jun 4, 2018 at 4:59

2 Answers 2

1

The solution I ended up with was not HTML as in the original question, but nevertheless some notes on my solution for anyone else who comes across this:

For JavaScript I ended up porting and testing mJS (JavaScript engine), then used MongooseOS which uses mJS and which I was more-or-less happy with. I decided to just use JavaScript and basically forget my original plan with HTML support.

With MongooseJS you can easily add C/C++ functions which can be called from JavaScript, so for my small 250x150 pixel display, and as I did not need user feedback, some formatted print() functions did the job fine. I downloaded the JavaScript over HTTP.

I'll refrain from discussing the pros and cons of MongooseOS (there are both) suffice to say that it ended up I think being the right solution in my case.

0

Have you looked at links2 ? http://www.aboutlinux.info/2007/02/links2-cross-platform-console-based-web.html

Not sure if it has ALL the javascript support you need, but it is the only super-light browser I know of that supports any kind of javascript.

Another alternative might be something like w3m - I recall there was an extension or helper program that allowed javascript - but I think a full GUI browser will end up too big for you.

A final alternative may be to find some of the original Maemo code and maybe the matching Debian repos it could use. Maemo was a Debian based OS for Nokia's first venture into tablets in 2000-2002ish area. Default browser was a custom Opera that spoofed an IE user agent, but you could add Debian repositories and use apps from the Debian ARM repos.

1
  • Only reading, not tried myself yet, but it appears links2 support of Javascript is deprecated, as also possibly with w3m. However your answer led me to eLinks and this post. But that all of these support(ed) Javascript to some extent probably means that they are all good candidates for my application, possibly with a different Javascript engine. Oct 2, 2017 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.