Skip to content

Consider switching from reqwest to ureq #1

Closed
@emilk

Description

@emilk

Hi! I just came across this crate, and it looks really promising!

Unfortunately I found the dependency tree to be too big to justify adding protoc-prebuilt as a dependency.

Most of the dependencies come from reqwest. Fortunately there is an easy solution: ureq has a much smaller footprint.

I can make a PR if you want!

❯ cargo tree -p protoc-prebuilt 
protoc-prebuilt v0.1.0
├── reqwest v0.11.18
│   ├── base64 v0.21.2
│   ├── bytes v1.4.0
│   ├── encoding_rs v0.8.32
│   │   └── cfg-if v1.0.0
│   ├── futures-core v0.3.28
│   ├── futures-util v0.3.28
│   │   ├── futures-core v0.3.28
│   │   ├── futures-io v0.3.28
│   │   ├── futures-task v0.3.28
│   │   ├── memchr v2.5.0
│   │   ├── pin-project-lite v0.2.9
│   │   ├── pin-utils v0.1.0
│   │   └── slab v0.4.8
│   │       [build-dependencies]
│   │       └── autocfg v1.1.0
│   ├── h2 v0.3.19
│   │   ├── bytes v1.4.0
│   │   ├── fnv v1.0.7
│   │   ├── futures-core v0.3.28
│   │   ├── futures-sink v0.3.28
│   │   ├── futures-util v0.3.28
│   │   │   ├── futures-channel v0.3.28
│   │   │   │   ├── futures-core v0.3.28
│   │   │   │   └── futures-sink v0.3.28
│   │   │   ├── futures-core v0.3.28
│   │   │   ├── futures-io v0.3.28
│   │   │   ├── futures-macro v0.3.28 (proc-macro)
│   │   │   │   ├── proc-macro2 v1.0.58
│   │   │   │   │   └── unicode-ident v1.0.8
│   │   │   │   ├── quote v1.0.27
│   │   │   │   │   └── proc-macro2 v1.0.58 (*)
│   │   │   │   └── syn v2.0.16
│   │   │   │       ├── proc-macro2 v1.0.58 (*)
│   │   │   │       ├── quote v1.0.27 (*)
│   │   │   │       └── unicode-ident v1.0.8
│   │   │   ├── futures-sink v0.3.28
│   │   │   ├── futures-task v0.3.28
│   │   │   ├── memchr v2.5.0
│   │   │   ├── pin-project-lite v0.2.9
│   │   │   ├── pin-utils v0.1.0
│   │   │   └── slab v0.4.8 (*)
│   │   ├── http v0.2.9
│   │   │   ├── bytes v1.4.0
│   │   │   ├── fnv v1.0.7
│   │   │   └── itoa v1.0.6
│   │   ├── indexmap v1.9.3
│   │   │   └── hashbrown v0.12.3
│   │   │   [build-dependencies]
│   │   │   └── autocfg v1.1.0
│   │   ├── slab v0.4.8 (*)
│   │   ├── tokio v1.28.1
│   │   │   ├── bytes v1.4.0
│   │   │   ├── libc v0.2.144
│   │   │   ├── mio v0.8.6
│   │   │   │   ├── libc v0.2.144
│   │   │   │   └── log v0.4.17
│   │   │   │       └── cfg-if v1.0.0
│   │   │   ├── num_cpus v1.15.0
│   │   │   │   └── libc v0.2.144
│   │   │   ├── pin-project-lite v0.2.9
│   │   │   ├── signal-hook-registry v1.4.1
│   │   │   │   └── libc v0.2.144
│   │   │   ├── socket2 v0.4.9
│   │   │   │   └── libc v0.2.144
│   │   │   └── tokio-macros v2.1.0 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.58 (*)
│   │   │       ├── quote v1.0.27 (*)
│   │   │       └── syn v2.0.16 (*)
│   │   │   [build-dependencies]
│   │   │   └── autocfg v1.1.0
│   │   ├── tokio-util v0.7.8
│   │   │   ├── bytes v1.4.0
│   │   │   ├── futures-core v0.3.28
│   │   │   ├── futures-sink v0.3.28
│   │   │   ├── pin-project-lite v0.2.9
│   │   │   ├── tokio v1.28.1 (*)
│   │   │   └── tracing v0.1.37
│   │   │       ├── cfg-if v1.0.0
│   │   │       ├── log v0.4.17 (*)
│   │   │       ├── pin-project-lite v0.2.9
│   │   │       ├── tracing-attributes v0.1.24 (proc-macro)
│   │   │       │   ├── proc-macro2 v1.0.58 (*)
│   │   │       │   ├── quote v1.0.27 (*)
│   │   │       │   └── syn v2.0.16 (*)
│   │   │       └── tracing-core v0.1.31
│   │   │           └── once_cell v1.17.1
│   │   └── tracing v0.1.37 (*)
│   ├── http v0.2.9 (*)
│   ├── http-body v0.4.5
│   │   ├── bytes v1.4.0
│   │   ├── http v0.2.9 (*)
│   │   └── pin-project-lite v0.2.9
│   ├── hyper v0.14.26
│   │   ├── bytes v1.4.0
│   │   ├── futures-channel v0.3.28
│   │   │   └── futures-core v0.3.28
│   │   ├── futures-core v0.3.28
│   │   ├── futures-util v0.3.28 (*)
│   │   ├── h2 v0.3.19 (*)
│   │   ├── http v0.2.9 (*)
│   │   ├── http-body v0.4.5 (*)
│   │   ├── httparse v1.8.0
│   │   ├── httpdate v1.0.2
│   │   ├── itoa v1.0.6
│   │   ├── pin-project-lite v0.2.9
│   │   ├── socket2 v0.4.9 (*)
│   │   ├── tokio v1.28.1
│   │   │   ├── bytes v1.4.0
│   │   │   ├── libc v0.2.144
│   │   │   ├── mio v0.8.6 (*)
│   │   │   ├── num_cpus v1.15.0 (*)
│   │   │   ├── pin-project-lite v0.2.9
│   │   │   └── socket2 v0.4.9 (*)
│   │   │   [build-dependencies]
│   │   │   └── autocfg v1.1.0
│   │   ├── tower-service v0.3.2
│   │   ├── tracing v0.1.37
│   │   │   ├── cfg-if v1.0.0
│   │   │   ├── pin-project-lite v0.2.9
│   │   │   └── tracing-core v0.1.31 (*)
│   │   └── want v0.3.0
│   │       ├── log v0.4.17 (*)
│   │       └── try-lock v0.2.4
│   ├── hyper-tls v0.5.0
│   │   ├── bytes v1.4.0
│   │   ├── hyper v0.14.26 (*)
│   │   ├── native-tls v0.2.11
│   │   │   ├── lazy_static v1.4.0
│   │   │   ├── libc v0.2.144
│   │   │   ├── security-framework v2.9.1
│   │   │   │   ├── bitflags v1.3.2
│   │   │   │   ├── core-foundation v0.9.3
│   │   │   │   │   ├── core-foundation-sys v0.8.4
│   │   │   │   │   └── libc v0.2.144
│   │   │   │   ├── core-foundation-sys v0.8.4
│   │   │   │   ├── libc v0.2.144
│   │   │   │   └── security-framework-sys v2.9.0
│   │   │   │       ├── core-foundation-sys v0.8.4
│   │   │   │       └── libc v0.2.144
│   │   │   ├── security-framework-sys v2.9.0 (*)
│   │   │   └── tempfile v3.5.0
│   │   │       ├── cfg-if v1.0.0
│   │   │       ├── fastrand v1.9.0
│   │   │       └── rustix v0.37.19
│   │   │           ├── bitflags v1.3.2
│   │   │           ├── errno v0.3.1
│   │   │           │   └── libc v0.2.144
│   │   │           ├── io-lifetimes v1.0.10
│   │   │           │   └── libc v0.2.144
│   │   │           └── libc v0.2.144
│   │   ├── tokio v1.28.1 (*)
│   │   └── tokio-native-tls v0.3.1
│   │       ├── native-tls v0.2.11 (*)
│   │       └── tokio v1.28.1 (*)
│   ├── ipnet v2.7.2
│   ├── log v0.4.17
│   │   └── cfg-if v1.0.0
│   ├── mime v0.3.17
│   ├── native-tls v0.2.11 (*)
│   ├── once_cell v1.17.1
│   ├── percent-encoding v2.2.0
│   ├── pin-project-lite v0.2.9
│   ├── serde v1.0.163
│   │   └── serde_derive v1.0.163 (proc-macro)
│   │       ├── proc-macro2 v1.0.58 (*)
│   │       ├── quote v1.0.27 (*)
│   │       └── syn v2.0.16 (*)
│   ├── serde_json v1.0.96
│   │   ├── itoa v1.0.6
│   │   ├── ryu v1.0.13
│   │   └── serde v1.0.163 (*)
│   ├── serde_urlencoded v0.7.1
│   │   ├── form_urlencoded v1.1.0
│   │   │   └── percent-encoding v2.2.0
│   │   ├── itoa v1.0.6
│   │   ├── ryu v1.0.13
│   │   └── serde v1.0.163 (*)
│   ├── tokio v1.28.1 (*)
│   ├── tokio-native-tls v0.3.1 (*)
│   ├── tower-service v0.3.2
│   └── url v2.3.1
│       ├── form_urlencoded v1.1.0 (*)
│       ├── idna v0.3.0
│       │   ├── unicode-bidi v0.3.13
│       │   └── unicode-normalization v0.1.22
│       │       └── tinyvec v1.6.0
│       │           └── tinyvec_macros v0.1.1
│       └── percent-encoding v2.2.0
└── zip v0.6.6
    ├── byteorder v1.4.3
    ├── crc32fast v1.3.2
    │   └── cfg-if v1.0.0
    └── flate2 v1.0.26
        ├── crc32fast v1.3.2 (*)
        └── miniz_oxide v0.7.1
            ├── adler v1.0.2
            └── simd-adler32 v0.3.5
❯ cargo tree -p ureq   
ureq v2.6.2
├── base64 v0.13.1
├── flate2 v1.0.26
│   ├── crc32fast v1.3.2
│   │   └── cfg-if v1.0.0
│   └── miniz_oxide v0.7.1
│       ├── adler v1.0.2
│       └── simd-adler32 v0.3.5
├── log v0.4.17
│   └── cfg-if v1.0.0
├── once_cell v1.17.1
├── rustls v0.20.8
│   ├── log v0.4.17 (*)
│   ├── ring v0.16.20
│   │   └── untrusted v0.7.1
│   │   [build-dependencies]
│   │   └── cc v1.0.79
│   │       └── jobserver v0.1.26
│   │           └── libc v0.2.144
│   ├── sct v0.7.0
│   │   ├── ring v0.16.20 (*)
│   │   └── untrusted v0.7.1
│   └── webpki v0.22.0
│       ├── ring v0.16.20 (*)
│       └── untrusted v0.7.1
├── url v2.3.1
│   ├── form_urlencoded v1.1.0
│   │   └── percent-encoding v2.2.0
│   ├── idna v0.3.0
│   │   ├── unicode-bidi v0.3.13
│   │   └── unicode-normalization v0.1.22
│   │       └── tinyvec v1.6.0
│   │           └── tinyvec_macros v0.1.1
│   └── percent-encoding v2.2.0
├── webpki v0.22.0 (*)
└── webpki-roots v0.22.6
    └── webpki v0.22.0 (*)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions