Featured

Accessing OneDrive like a local drive on Linux with onedriver

If you’ve ever wished your OneDrive files just appeared in your Linux filesystem, no clunky sync clients, no waiting while 100 GB of data crawl in the background, then meet onedriver . It’s a clever little tool that mounts OneDrive as a native filesystem on Linux, making your cloud files act like local files without actually syncing them all. onedriver mounts your OneDrive account to a directory (for example, ~/OneDrive ) so you can use your files through your file browser or CLI as if they were on your machine.  It does on-demand download : a file is only fetched from OneDrive the moment you try to open it — you don’t have to wait for everything to sync.  Bidirectional behavior: changes on OneDrive show up locally; write operations locally are reflected remotely. (Though “sync” here is more subtle than full-sync clients.)  Works offline for previously opened files. If you lose connectivity, the filesystem becomes read-only until you’re back online.  Installat...

Install Tokio runtime


  1. Ensure Rust is Installed
    If you haven't installed Rust yet, make sure to do so using rustup:

    winget install -e --id Rustlang.Rustup
    
  2. Create a New Rust Project
    If you're starting fresh, create a new Rust project:

    cargo new my_project
    cd my_project
    
  3. Add Tokio as a Dependency
    Open the Cargo.toml file in your project and add Tokio:

    [dependencies]
    tokio = { version = "1", features = ["full"] }
    

    Alternatively, you can run:

    cargo add tokio --features full
    
  4. Write a Basic Tokio Application
    Now, create a simple async function in main.rs:

    use tokio::time::{sleep, Duration};
    
    #[tokio::main]
    async fn main() {
        println!("Hello, Tokio!");
        sleep(Duration::from_secs(2)).await;
        println!("Done!");
    }
    
  5. Build and Run
    Compile and execute your program:

    cargo run

Comments