Project

General

Profile

Building of Hachette and modularization - (distant) future plans

Added by koszko 6 months ago

So far the build only relies on standard UNIX tools like grep, sed and sh. The only "dependency" is sha256 implementation which is bundled with our sources. The proposed HTML-page build system would be similar in this regard. However, for some functionalities it would be good to actually pull some dependencies.

Possibly useful deps that come to my mind now are:

  • JSZip - https://stuk.github.io/jszip/ - would be useful to be able to import/export packages in Hydrilla format (as zipped directories that can be unzipped under /var/lib/hydrilla/content/)
  • OpenPGP.js - https://github.com/openpgpjs/ - would be useful to be able to cryptographically sign Hydrilla packages and verify the signatures in Hachette

There are obviously alternative libraries that could be used for similar purpose. What is important, though, is that there will be desire to use complex JavaScript libraries. And if we depend on them, the extension will no longer be as simply buildable.

Proposed solution:
Let's make those features optional and find a way to make them a kind of "plugins" for Hachette and distribute them through Hydrilla


Replies (5)

RE: Building of Hachette and modularization - (distant) future plans - Added by jahoti 6 months ago

Yes! In fact, at risk of possibly tripping the infrastructure trap, it might be useful to develop a system for Hachette plugins, which would make Hachette (almost) as customizable as websites and make it easy to put everything except the core extension on Hydrilla instead.

RE: Building of Hachette and modularization - (distant) future plans - Added by koszko 6 months ago

Actually, if we define a clear API for those plugins, it can even have an additional benefit of making "porting" of Hachette to non-WebExtension platforms easier :)

RE: Building of Hachette and modularization - (distant) future plans - Added by jahoti 6 months ago

It does too! Maybe then this should be a high priority, albeit one that probably shouldn't be touched until something is released.

RE: Building of Hachette and modularization - (distant) future plans - Added by koszko 6 months ago

Maybe then this should be a high priority

I don't think so as long as the features that require this (reading&writing archived directories, PGP signatures) are not high priority.

Also, we might be able to bypass this need entirely. For example if we replace full PGP with raw signing as offered by crypto.subtle and zip with some simpler format that does not require more than a simple single-file dependency. These solutions came to my mind just now and honestly, they seem like interesting issues and deserve their own discussions when time comes :)

Plugins would be a cool feature to add later on, though

RE: Building of Hachette and modularization - (distant) future plans - Added by jahoti 6 months ago

Plugins would be a cool feature to add later on, though

Definitely! Nevertheless, you're right that we should probably wait until an appropriate use case actually arises.

    (1-5/5)