GithubHelp home page GithubHelp logo

Add a `standalone` feature about aoc HOT 2 OPEN

remi-dupre avatar remi-dupre commented on May 20, 2024
Add a `standalone` feature

from aoc.

Comments (2)

swlody avatar swlody commented on May 20, 2024

With regards to the http client, I tried using minreq after reading this article and it seems to have pretty similar dependencies to curl (26 vs 22) and substantially less than attohttpc (41) while also compiling a bit faster than curl.

// Using curl
PS C:\Users\Sam\Code\curltest> cargo build
   Compiling pkg-config v0.3.19
   Compiling cc v1.0.66
   Compiling vcpkg v0.2.11
   Compiling winapi v0.3.9
   Compiling libc v0.2.81
   Compiling curl v0.4.34
   Compiling lazy_static v1.4.0
   Compiling libz-sys v1.1.2
   Compiling curl-sys v0.4.39+curl-7.74.0
   Compiling socket2 v0.3.17
   Compiling schannel v0.1.19
   Compiling curltest v0.1.0 (C:\Users\Sam\Code\curltest)
    Finished dev [unoptimized + debuginfo] target(s) in 15.69s

// Using minreq
PS C:\Users\Sam\Code\curltest> cargo build
   Compiling winapi v0.3.9
   Compiling cc v1.0.66
   Compiling spin v0.5.2
   Compiling untrusted v0.7.1
   Compiling byteorder v1.3.4
   Compiling log v0.4.11
   Compiling cfg-if v0.1.10
   Compiling minreq v2.2.1
   Compiling lazy_static v1.4.0
   Compiling base64 v0.10.1
   Compiling ring v0.16.19
   Compiling webpki v0.21.4
   Compiling sct v0.6.0
   Compiling rustls v0.16.0
   Compiling webpki-roots v0.18.0
   Compiling curltest v0.1.0 (C:\Users\Sam\Code\curltest)
    Finished dev [unoptimized + debuginfo] target(s) in 7.97s
	
// Using attohttpc
PS C:\Users\Sam\Code\curltest> cargo build
   Compiling tinyvec_macros v0.1.0
   Compiling matches v0.1.8
   Compiling autocfg v1.0.1
   Compiling winapi v0.3.9
   Compiling libc v0.2.81
   Compiling crc32fast v1.2.1
   Compiling cfg-if v1.0.0
   Compiling adler v0.2.3
   Compiling native-tls v0.2.6
   Compiling log v0.4.11
   Compiling lazy_static v1.4.0
   Compiling percent-encoding v2.1.0
   Compiling bytes v0.5.6
   Compiling itoa v0.4.6
   Compiling fnv v1.0.7
   Compiling cfg-if v0.1.10
   Compiling wildmatch v1.0.12
   Compiling tinyvec v1.1.0
   Compiling unicode-bidi v0.3.4
   Compiling form_urlencoded v1.0.0
   Compiling miniz_oxide v0.4.3
   Compiling http v0.2.1
   Compiling unicode-normalization v0.1.16
   Compiling flate2 v1.0.19
   Compiling idna v0.2.0
   Compiling url v2.2.0
   Compiling schannel v0.1.19
   Compiling attohttpc v0.16.0
   Compiling curltest v0.1.0 (C:\Users\Sam\Code\curltest)
    Finished dev [unoptimized + debuginfo] target(s) in 6.83s

from aoc.

remi-dupre avatar remi-dupre commented on May 20, 2024

I was actually thinking of running curl binary directly from https://doc.rust-lang.org/std/process/struct.Command.html to avoid any dependency. It is less robust but I suppose it would be fine with a nice message asking to activate the standalone feature if curl is not found.

from aoc.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.