零细节、以隐私为核心的应用内文件系统。
ZboxFS is a zero-details, privacy-focused in-app file system. Its goal is to help application store files securely, privately and reliably. By encapsulating files and directories into an encrypted repository, it provides a virtual file system and exclusive access to authorised application.
Unlike other system-level file systems, such as [ext4], [XFS] and [Btrfs], which provide shared access to multiple processes, ZboxFS is a file system that runs in the same memory space as the application. It provides access to only one process at a time.
By abstracting IO access, ZboxFS supports a variety of underlying storage layers, including memory, OS file system, RDBMS and key-value object store.
ZboxFS is under active development, we are not responsible for any data loss or leak caused by using it. Always back up your files and use at your own risk!
Many OS-level file systems support encryption, such as [EncFS], [APFS] and [ZFS]. Some disk encryption tools also provide virtual file system, such as [TrueCrypt], [LUKS] and [VeraCrypt].
This diagram shows the difference between ZboxFS and them.
Below is the feature comparison list.
ZboxFS OS-level File Systems Disk Encryption Tools Encrypts file contents :heavy_check_mark: partial :heavy_check_mark: Encrypts file metadata :heavy_check_mark: partial :heavy_check_mark: Encrypts directory :heavy_check_mark: partial :heavy_check_mark: Data integrity :heavy_check_mark: partial :heavy_multiplication_x: Shared access for processes :heavy_multiplication_x: :heavy_check_mark: :heavy_check_mark: Deduplication :heavy_check_mark: :heavy_multiplication_x: :heavy_multiplication_x: Compression :heavy_check_mark: partial :heavy_multiplication_x: Content versioning :heavy_check_mark: :heavy_multiplication_x: :heavy_multiplication_x: COW semantics :heavy_check_mark: partial :heavy_multiplication_x: ACID Transaction :heavy_check_mark: :heavy_multiplication_x: :heavy_multiplication_x: Varieties of storages :heavy_check_mark: :heavy_multiplication_x: :heavy_multiplication_x: API access :heavy_check_mark: through VFS through VFS Symbolic links :heavy_multiplication_x: :heavy_check_mark: depends on inner FS Users and permissions :heavy_multiplication_x: :heavy_check_mark: :heavy_check_mark: FUSE support :heavy_multiplication_x: :heavy_check_mark: :heavy_check_mark: Linux and macOS support :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: Windows support :heavy_check_mark: partial :heavy_check_mark:ZboxFS supports a variety of underlying storages. Memory storage is enabled by default. All the other storages can be enabled individually by specifying its corresponding Cargo feature when building ZboxFS.
Storage URI identifier Cargo Feature Memory "mem://" N/A OS file system "file://" storage-file SQLite "sqlite://" storage-sqlite Redis "redis://" storage-redis Zbox Cloud Storage "zbox://" storage-zbox-native* Visit zbox.io to learn more about Zbox Cloud Storage.
For reference documentation, please visit documentation.
32-bit and other OS are NOT supported yet.
Add the following dependency to your Cargo.toml:
[dependencies]
zbox = "0.9.2"
If you don't want to install libsodium by yourself, simply specify
libsodium-bundled feature in dependency, which will automatically download,
verify and build libsodium.
[dependencies]
zbox = { version = "0.9.2", features = ["libsodium-bundled"] }
…
ZboxFS comes with [Docker] support, which made building ZboxFS easier. Check each repo for more details.
[zboxfs/base] Base image for building ZboxFS on Linux
[zboxfs/wasm] Docker image for building WebAssembly binding
[zboxfs/nodejs] Docker image for building Node.js binding
[zboxfs/android] Docker image for building Android Java binding
By default, ZboxFS uses dynamic linking when it is linked with libsodium. If you want to change this behavior and use static linking, you can enable below two environment variables.
On Linux/macOS,
export SODIUM_LIB_DIR=/path/to/your/libsodium/lib
export SODIUM_STATIC=true
On Windows,
set SODIUM_LIB_DIR=C:\path\to\your\libsodium\lib
set SODIUM_STATIC=true
And then re-build the code.
cargo build
The performance test is run on a Macbook Pro 2017 laptop with spec as below.
Spec Value Processor Name: Intel Core i7 Processor Speed: 3.5 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 4 MB Memory: 16 GB OS Version: macOS High Sierra 10.13.6Test result:
Read Write TPS Baseline (memcpy): 3658.23 MB/s 3658.23 MB/s N/A Baseline (file): 1307.97 MB/s 2206.30 MB/s N/A MemoryFuture plans and continuation
Python support
storage-sqlite RepoOpener not creating path
Question: reason not support symbolic link?
Failed open repo in file mode
Snapshots?
FR: `zbox::Repo::ongoing_transaction`
Problems when `file://` storage runs out of space
Concurrency
zbox::Error is not accessible from within std::io::Error