summaryrefslogtreecommitdiff
path: root/rust-src/README.md
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-01-03 22:31:36 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-02-21 01:03:08 -0500
commit28f703cc256fb6ae209aba1d1fe509d603de1735 (patch)
tree220fc0e14cd29a3b56fe18dc8594d7bb4fe66718 /rust-src/README.md
parentda6a35689518599b381c285cd9505ab8d58f7c73 (diff)
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>
Diffstat (limited to 'rust-src/README.md')
-rw-r--r--rust-src/README.md62
1 files changed, 62 insertions, 0 deletions
diff --git a/rust-src/README.md b/rust-src/README.md
new file mode 100644
index 00000000..e4700f6b
--- /dev/null
+++ b/rust-src/README.md
@@ -0,0 +1,62 @@
+Usage
+=====
+
+```
+bcachefs-mount 0.1.0
+Mount a bcachefs filesystem by its UUID
+
+USAGE:
+ bcachefs-mount [OPTIONS] <uuid> <mountpoint>
+
+FLAGS:
+ -h, --help
+ Prints help information
+
+ -V, --version
+ Prints version information
+
+
+OPTIONS:
+ -o <options>
+ Mount options [default: ]
+
+ -p, --password <password>
+ Where the password would be loaded from.
+
+ Possible values are: "fail" - don't ask for password, fail if filesystem is encrypted; "wait" - wait for
+ password to become available before mounting; "ask" - prompt the user for password; [default: fail]
+
+ARGS:
+ <uuid>
+ External UUID of the bcachefs filesystem
+
+ <mountpoint>
+ Where the filesystem should be mounted
+```
+
+Caveats
+=======
+
+* `--password ask` is not yet implemented, but you can use `--password wait`, and load the key with `bcachefs unlock`.
+
+Build
+=====
+
+```sh
+$ git submodule update --init --recursive
+$ cargo build --release
+```
+
+Binary will be built in `target/release/bcachefs-mount`
+
+Dependencies:
+
+* rust
+* blkid
+* uuid
+* liburcu
+* libsodium
+* zlib
+* liblz4
+* libzstd
+* libkeyutils