Distributing a js_of_ocaml app

Is there a lightweight alternative to electron for distributing an app that relies mostly on the web browser APIs ?

I’m not aware of one, and I looked around for one pretty carefully for a few days in the spring. If there is a decent alternative, it isn’t well advertised or has shown up in recent months. If you find one, please post about it.

1 Like

I haven’t personally used it so can’t comment on it being light weight, but i’ve heard good things about https://github.com/zserge/webview

2 Likes

Thanks ! Interesting proposal I may investigate. However I mainly need to deploy to windows and I’m a little bit unsure about my usage of webapis and IE, I would have been more confident with an edge based solution.

1 Like

If it is mostly windows (I’m assuming windows 10 since you mention edge) maybe a progressive web app might suffice? They have their limitations but from what I know windows 10 now supports it. Chrome also added support for it with version 70 (https://developers.google.com/web/progressive-web-apps/desktop).

The first installation will be a little unique for people not used to it, but after that it should behave like a regular app by being in start menus etc.

1 Like

Do you know if these progressive web apps support access to the file system ? The reason I’m actually looking to go towards an app is that I’m hitting persistent storage limitations in the browser.

Hmm I haven’t used anything apart from IndexedDb for storage. Looking at their platform page. I don’t know if its possible to have file system access. I’d assume you would end up with similar limitations as a regular web app running in the browser.

I wish there was more competition for electron. I suppose one could try and write QML can call out to javascript [http://doc.qt.io/qt-5/qtqml-javascript-topic.html]

That I need to look into aswell do you have any experience about what kind of limitations you get, how they are handled and the kind of expunge guarantee ? Information about this is quite scattered on the web.

I’m afraid my knowledge about it is limited to the MDN docs and Google’s progressive web app resources. It’s something that even I want to learn more about as I start to do more with ocaml on the browser.

1 Like

There are Danny Willems’s Cordova bindings (which use gen_js_api) in opam.

2 Likes