alexcrichton / curl-rust

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

added unix-sockets feature support #309

Closed gngeorgiev closed 4 years ago

gngeorgiev commented 5 years ago

Related to https://github.com/alexcrichton/curl-rust/issues/297

Example:

let mut easy = Easy::new();
easy.unix_socket("/var/socket_path.sock")?;
easy.url("http://localhost/path")?;
alexcrichton commented 5 years ago

Thanks for the PR!

I think though it's probably fine to enable this unconditionally, could this just be set always on unix platforms in the build script?

gngeorgiev commented 5 years ago

@alexcrichton I think this is reasonable. I will do the changes!

Mythra commented 4 years ago

Hey 👋

Looks like it been a bit since this PR was touched (I'm assuming due to holidays). However I'll ask just in case, anything I can do to help get this feature in, and released?

gngeorgiev commented 4 years ago

@SecurityInsanity Sorry, yes holidays + new job are the reason of my forgetfulness about this. Will do my best to finish it during the weekend ✌️

Mythra commented 4 years ago

Hey any update on this? Perhaps I can take it over? I'd like to get off my forks :sweat_smile:

gngeorgiev commented 4 years ago

@alexcrichton, @SecurityInsanity could you take a look now? I hope this is closer to what @alexcrichton wanted 🙇

gngeorgiev commented 4 years ago

I spent some time debugging the mingw failure. Right now I don't know how to fix the missing un.h file to mingw. It seems that other headers are there, e.g. types.h but un.h isn't.

root@d9242764c267:/# find / -name un.h
/usr/include/linux/un.h
/usr/include/x86_64-linux-gnu/sys/un.h
root@d9242764c267:/# find / -name types.h
/usr/include/linux/types.h
/usr/include/linux/iio/types.h
/usr/include/x86_64-linux-gnu/asm/types.h
/usr/include/x86_64-linux-gnu/bits/types.h
/usr/include/x86_64-linux-gnu/sys/types.h
/usr/include/rpc/types.h
/usr/include/asm-generic/types.h
/usr/lib/gcc/x86_64-w64-mingw32/5.3-win32/include/c++/parallel/types.h
/usr/lib/gcc/x86_64-w64-mingw32/5.3-posix/include/c++/parallel/types.h
/usr/lib/gcc/i686-w64-mingw32/5.3-win32/include/c++/parallel/types.h
/usr/lib/gcc/i686-w64-mingw32/5.3-posix/include/c++/parallel/types.h
/usr/share/mingw-w64/include/sys/types.h
/usr/i686-w64-mingw32/include/sys/types.h
/usr/x86_64-w64-mingw32/include/sys/types.h

Even installing the whole mingw-w64 package didn't add the file. Maybe I am going in the wrong direction 🤔

@alexcrichton Do you have any idea about this?

gngeorgiev commented 4 years ago

Sorry, @alexcrichton I have no idea why x86_64 nighly is failing. Maybe it's a nightly thing since beta is passing? I have rebased upstream on top of my work btw 🙂

alexcrichton commented 4 years ago

Yes I've tried to fix that on master now, mind rebasing to pull that in?

Mythra commented 4 years ago

I realize things are a bit focused elsewhere right now, so don't feel like this needs to be done immediately or anything, but figured I'd bump again for visibility. If I can be of any help getting this across the line, I'd also be happy to help.

Mythra commented 4 years ago

@gngeorgiev , no rush but any update? Would it be easier if I opened up my own pr and we can close this one, if you have other things going on? Don't wanna step on any toes, and realize there are many things going on right now, but also really tired of maintaining a manual fork of libraries :sweat_smile:

sagebind commented 4 years ago

@SecurityInsanity I'm OK with you taking this over if @gngeorgiev doesn't have time to work on this right now. Feel free to open an alternative PR when you have the opportunity.

Mythra commented 4 years ago

https://github.com/alexcrichton/curl-rust/pull/346 has been opened, and has been updated to latest master, and I can keep it updated. I've cherrypicked though to keep @gngeorgiev 's credit for the work they did do.

sagebind commented 4 years ago

346 has been merged and is now available in curl 0.4.31. Thanks to @gngeorgiev and @SecurityInsanity!