koverstreet / bcachefs-tools

http://bcachefs.org
GNU General Public License v2.0
120 stars 89 forks source link

make the crate a lib which can be used by other rust code #247

Closed shenjiangqiu closed 6 months ago

shenjiangqiu commented 6 months ago

Why not add a lib.rs into bcache-tool so that other rust code can directly use the bindings. this modification will include:

  1. add a lib.rs and move some mod xxx; from the bin file into the lib file.
  2. create some safe bindings about {mount, device,subvolume} in lib.rs.
  3. change the bin file(bcachefs.rs) to use the safe bindings( instead of currently used usafe bindings).

Is this a good idea?

koverstreet commented 6 months ago

Are you asking if you should do that? I'd start with something smaller.

shenjiangqiu commented 6 months ago

Good to here that, I was plaining to do something.