summaryrefslogtreecommitdiff
path: root/rust-src/Cargo.toml
AgeCommit message (Collapse)Author
2024-01-16move Rust sources to top level, C sources into c_srcThomas Bertschinger
This moves the Rust sources out of rust_src/ and into the top level. Running the bcachefs executable out of the development tree is now: $ ./target/release/bcachefs command or $ cargo run --profile release -- command instead of "./bcachefs command". Building and installing is still: $ make && make install Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16remove library from bcachefs-tools Rust packageThomas Bertschinger
When bcachefs was a C program that had some functions implemented in Rust, it was necessary to make a static library containing the Rust functions available for the C program to link. Now that bcachefs is a Rust program, that library is no longer needed. Instead, the Rust executable links in libbachefs.a. This patch updates the crate structure to reflect that. The command functions are moved into their own module. There could be a need to create a "libbachefs-tools" library in the future that exposes an API for bcachefs functionality to other userspace programs. That will be a different, external API as opposed to the previous library functions which were an internal API for the bcachefs tool itself. Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16convert main() from C to RustThomas Bertschinger
This moves the main() function from C to Rust. It also updates the name of the Rust package from "bcachefs-rust" to "bcachefs-tools". Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-15Prune rust dependenciesKent Overstreet
pruned via 'cargo machete --fix' Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-12rust: remove dependency on itertoolsFaidon Liambotis
The only use for itertools is in parse_mount_options() where we take a vector, convert it to iterator and then join it. Instead, we can join the vector directly. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-23rust: fix MSRV buildAlexander Fougner
- 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-16Bump rust edition to 2021Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-10add command to generate Rust-part CLI completionsZhai Can
2023-11-02Update, slim down rust dependenciesKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-08-04ci: set and verify MSRVAlexander Fougner
To prevent uncontrolled usage of new rust features, directly or from dependencies, set a minimum supported Rust version and verify it builds. Signed-off-by: Alexander Fougner <fougner89@gmail.com>
2023-04-26chore: logger for idiomatic style and expanded logging levelsTruongSinh Tran-Nguyen
Improve the Rust logger by adhering to idiomatic Rust conventions and incorporating additional logging levels: warn, debug, and trace. Signed-off-by: TruongSinh Tran-Nguyen <i@truongsinh.pro>
2023-02-21Rust now integrated into bcachefs binaryKent Overstreet
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>