backhand icon indicating copy to clipboard operation
backhand copied to clipboard

Add `unsquashfs` utility to lib

Open lovesegfault opened this issue 2 years ago • 4 comments
trafficstars

Currently, if you want to replace a std::process::Command::new("unsquashfs") call with backhand, you need to replicate a large portion of the code in backhand-cli's unsquashfs bin.

It would be nice if the functionality of extracting a squashfs into a dir was provided by the library.

lovesegfault avatar Nov 17 '23 18:11 lovesegfault

Surely. I already have backhand-cli for the next release, I could just extract the cli as-a- llibrary.

wcampbell0x2a avatar Nov 17 '23 23:11 wcampbell0x2a

I wanted to try my hand at this, what would you prefer:

  1. Adding the utility to backhand's lib (will increase dependency closure)
  2. Adding it to backhand under a helpers feature
  3. Adding it in a new backhand-helpers crate

lovesegfault avatar Dec 12 '23 20:12 lovesegfault

I haven't thought much about where the code would be, or what the API would be. But I expect the duplication to be the most between this package and backhand-cli. I fact, maybe just have the code be in that package, just as the lib.rs.

wcampbell0x2a avatar Dec 15 '23 17:12 wcampbell0x2a

The API would mostly have the main of the bins, with the Clap argument structs as arguments? Just thinking out loud.

wcampbell0x2a avatar Dec 15 '23 17:12 wcampbell0x2a