Skip to content

lunatic::net::resolve no longer seems to work #61

@SteveSandersonMS

Description

@SteveSandersonMS

This looks like a very exciting project!

I tried the following example code from the repo:

use lunatic::net;

fn main() {
    let wikipedia = net::resolve("wikipedia.org:80").unwrap();
    for addr in wikipedia {
        println!("wikipedia.org resolves to {:?}", addr);
    }
}

but it fails with:

thread 'async-std/runtime' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.10.0/src/runtime/blocking/pool.rs:84:33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'task has failed', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/async-task-4.0.3/src/task.rs:368:45

This is using:

  • Lunatic 0.6.1 from releases
  • The lunatic crate version 0.7.0 or 0.6.1 (I tried both)
  • On Windows or Linux (I tried both)

Maybe it's related to the recent change to "switch from tokio.rs to async_std". But should this API still be expected to work? Is there an alternative?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions