]> git.sesse.net Git - bcachefs-tools-debian/commit
Rust: Start of cmd_list rewrite
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 27 Feb 2023 02:38:12 +0000 (21:38 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 28 Feb 2023 02:45:42 +0000 (21:45 -0500)
commite0e06d95f899e5e83d66e94600928156a5eb3a4b
tree5de00419aeed9689125493ce6894ab90b5ea57a0
parent30cca2e94d0dfa8c3151daf1393f402d32bb9407
Rust: Start of cmd_list rewrite

This is a _very_ preliminary rewrite of the cmd_list tool in rust, which
is intended to be a testing ground for a safe interface in Rust to the
core btree interface. This adds rust wrappers for:

bch_fs: provides bch2_fs_open(), bch2_fs_stop
btree_trans: provides bch2_trans_init(), bch2_trans_exit()
btree_iter: provides peek, peek_and_restart, advance
bch_errcode: implements Display (wraps bch2_err_str())
bpos: implements Ord (wraps bpos_cmp())
bkey_s_c: implements Display (wraps bch2_bkey_val_to_text())

and other assorted types.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
17 files changed:
bcachefs.c
cmd_list.c
cmds.h
rust-src/Cargo.lock
rust-src/bch_bindgen/Cargo.lock
rust-src/bch_bindgen/Cargo.toml
rust-src/bch_bindgen/build.rs
rust-src/bch_bindgen/src/btree.rs [new file with mode: 0644]
rust-src/bch_bindgen/src/errcode.rs [new file with mode: 0644]
rust-src/bch_bindgen/src/fs.rs [new file with mode: 0644]
rust-src/bch_bindgen/src/lib.rs
rust-src/bch_bindgen/src/libbcachefs_wrapper.h
rust-src/bch_bindgen/src/rs.rs
rust-src/src/cmd_list.rs [new file with mode: 0644]
rust-src/src/cmd_mount.rs
rust-src/src/filesystem.rs [deleted file]
rust-src/src/lib.rs