alexcrichton / curl-rust

Rust bindings to libcurl
MIT License
1.02k stars 235 forks source link

Unix socket support #297

Closed jo2wan closed 4 years ago

jo2wan commented 5 years ago

Hi, I have a quick question,

It seems I have to add some options to build.rs to compile libcurl with unix socket support. Is it possible to pass those flags from a cargo.ml? I don't want to get the curl-sys locally with the two extra flags only. Or maybe the way forward would be to create a specific feature.

alexcrichton commented 5 years ago

I believe this was added in https://github.com/alexcrichton/curl-rust/pull/154, but feel free to comment here if that doesn't work!

jo2wan commented 5 years ago

it does not work, when you libcurl is not installed on the machine and when you compile it from build.rs. I had to add the two following flags in the build.rs (which is not really convenient as I have to use a local version of curl-rust crate)

    cfg.define("USE_UNIX_SOCKETS", None)
        .define("HAVE_SYS_UN_H", None);
alexcrichton commented 5 years ago

Ah ok, good to know! Want to send a PR with that update?

sagebind commented 4 years ago

This has now been added and published in version 0.4.31!