Skip to content

Cannot use with smol async runtime #1

Description

@susu

In the README, you wrote that it is runtime agnostic, however, it seems relying on tokio, since I got this runtime error:

Example program:

fn main() -> anyhow::Result<()> {
    smol::block_on(async {

        let mut client = smb2::connect(
            "server",
            "user",
            "password",
        ).await?;

        let shares = client.list_shares().await?;
        println!("Shares:");
        for share in shares {
            println!(" - {} / {}", share.name, share.comment);
        }

        Ok(())
    })
}

thread 'main' (...) panicked at .../smb2-0.11.3/src/transport/tcp.rs:46:22:
there is no reactor running, must be called from the context of a Tokio 1.x runtime

Using smb2 = "0.11.3"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions