Crates.io | fuse3_opendal |
lib.rs | fuse3_opendal |
version | 0.0.9 |
source | src |
created_at | 2024-06-21 11:08:38.74682 |
updated_at | 2024-11-07 06:03:24.125256 |
description | fuse3 integration for Apache OpenDAL |
homepage | https://opendal.apache.org/ |
repository | https://github.com/apache/opendal |
max_upload_size | |
id | 1279397 |
size | 40,401 |
fuse3_opendal
is an fuse3
implementation using opendal.
This crate can help you to access ANY storage services by mounting locally by FUSE
.
use fuse3::path::Session;
use fuse3::MountOptions;
use fuse3::Result;
use fuse3_opendal::Filesystem;
use opendal::services::Memory;
use opendal::Operator;
#[tokio::test]
async fn test() -> Result<()> {
// Build opendal Operator.
let op = Operator::new(Memory::default())?.finish();
// Build fuse3 file system.
let fs = Filesystem::new(op, 1000, 1000);
// Configure mount options.
let mount_options = MountOptions::default();
// Start a fuse3 session and mount it.
let mut mount_handle = Session::new(mount_options)
.mount_with_unprivileged(fs, "/tmp/mount_test")
.await?;
let handle = &mut mount_handle;
tokio::select! {
res = handle => res?,
_ = tokio::signal::ctrl_c() => {
mount_handle.unmount().await?
}
}
Ok(())
}
The first and most prominent mentions must use the full form: Apache OpenDALâ„¢ of the name for any individual usage (webpage, handout, slides, etc.) Depending on the context and writing style, you should use the full form of the name sufficiently often to ensure that readers clearly understand the association of both the OpenDAL project and the OpenDAL software product to the ASF as the parent organization.
For more details, see the Apache Product Name Usage Guide.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.