-
Notifications
You must be signed in to change notification settings - Fork 23
Add wcurl in Rust #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2622448 to
cc35615
Compare
56ffd14 to
07654d3
Compare
|
Perf results, the first invocation of the shell script version is always gonna be slow, needs to execute multiple binaries, a shell, etc. from scratch. This is all cached in following invocations. wcurl-rs is just one small binary that calls curl, so not really an issue. |
|
Optimized even further: |
f615dee to
bf3282f
Compare
|
Even more optimized: |
To have a compiled binary free of dependancies Signed-off-by: Eric Curtin <[email protected]>
|
I've been a bit too busy lately but will reply to this PR by the weekend, sorry about the delay. |
|
I like the idea of experimenting with a Rust-based wcurl, but I don't think it makes sense to merge it. The point of wcurl is to have a wget alternative based on curl, and for this to work, it needs to be a solution that comes shipped with curl, otherwise if it's something the user needs extra steps to install then it's no different than not using curl, this new tool might as well have any other name. wcurl was initially shipped with the curl package in Debian, and then later it became shipped with curl upstream. A compiled wcurl implementation would have to be something which can still be shipped with curl, supporting as many architectures as curl does. The only way we can achieve this would be with C and using libcurl. Then for a compiled wcurl, we also need to think what we gain from it, based on recent work from @vszakats it sounds like it would make its usage easier on Windows environments, but the biggest difference would be that wcurl would be able to support more features with higher complexity (e.g.: we will never implement recursive downloads in shell). Myself and @sergiodj were recently looking into libcurl and it seems that a libcurl wcurl will require careful planning around how to implement some of the curl CLI features without duplicating code, this should be done closely with the curl developers. Thank you for the proposal though, @ericcurtin. |
|
From a Windows POV, specifically from the curl-for-win angle where the I like the size improvements (and fixing the info-leak) and found the (The new size is comparable to the trurl binary (on macOS), which also But, adding a Rust-based wcurl to the Windows package would mean a large This amount of resources is IMO not practical to replace 300 lines of (Also the script can be run with the help of a ~650 KB busybox.exe.) Memory safety in this particular case doesn't add an advantage compared |
6 dependancies? This had zero it used stdlib Rust. The PR is closed anyway.
|
|
It's more than 6: I see it's closed, sorry for giving you feedback! |
To have a compiled binary free of dependancies