PWAsForFirefox icon indicating copy to clipboard operation
PWAsForFirefox copied to clipboard

Support copy-on-write to use installed firefox runtime

Open JJRcop opened this issue 3 years ago • 0 comments

Problem Description

You must more or less install Firefox again to use this extension, maintaining two versions of it rather than only one.

Proposed Solution

Support some form of union mounting/CoW mount/overlayfs on platforms that support it, and offer to use the installed Firefox runtime instead of downloading another one.

This would mount the installed Firefox runtime into $XDG_DATA_HOME/firefoxpwa/runtime or $HOME/.local/share/firefoxpwa/runtime like it currently uses when installing a new runtime, but using a union mount or similar technology to patch the runtime, so that the original firefox runtime is untouched, but viewing the runtime within the union mounted directory shows a patched version.

Additional Information

This may need to be unmounted then cleared and re-patched/remounted when an update is detected. I don't consider myself skilled enough yet, especially not in Rust, to do this myself at this time.

I am doing this myself manually using fuse-overlayfs, and in my experience it works great, especially since the runtime patching is not so big. Recently I did have a problem after an update, but clearing out the folder and restarting the mount worked great after re-patching.

JJRcop avatar Sep 14 '22 23:09 JJRcop