Commit Graph

8 Commits

Author SHA1 Message Date
Alexander Fougner
fbad1bfdf3 rust: fix MSRV build
- downgrade clap_completion to 4.3.x (1.65 compatible)
- dependency updates
- remove unused imports

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-11-23 19:29:43 +01:00
Zhai Can
1d1fe7b0b6
add command to generate Rust-part CLI completions 2023-11-10 21:20:01 +08:00
Alexander Fougner
26efa5cf2e downgrade rust deps to compile for MSRV
- add helper for cargo update, whilst respecting MSRV

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-11-04 20:29:28 -04:00
Kent Overstreet
37ee7f0591 Update, slim down rust dependencies
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-02 16:44:59 -04:00
Kent Overstreet
8a7e3344fe rust: Filesystem options now supported
This implements opt_set!(), which works exactly the same as the C
version and allows filesystem options to be specified in Rust code.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-28 06:15:48 -05:00
Kent Overstreet
a3eb6ad8ef rust: BtreeIterFlags
This adds a new wrapper type for btree iterator flags.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-27 22:15:10 -05:00
Kent Overstreet
e0e06d95f8 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>
2023-02-27 21:45:42 -05:00
Kent Overstreet
28f703cc25 Rust now integrated into bcachefs binary
Rust is now required for building the bcachefs tool, and rust code is
now fully integrated with the C codebase - meaning it is possible to
call back and forth.

The mount helper is now a subcommand, 'mount.bcachefs' is now a small
shell wrapper that invokes 'bcachefs mount'.

This will make it easier to start rewriting other subcommands in rust,
and eventually the whole command line interface.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-21 01:03:08 -05:00