Skip to content
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

Consider switching from reqwest to ureq #1

Closed
emilk opened this issue May 30, 2023 · 2 comments
Closed

Consider switching from reqwest to ureq #1

emilk opened this issue May 30, 2023 · 2 comments

Comments

@emilk
Copy link

emilk commented May 30, 2023

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 (*)
@sergeiivankov
Copy link
Owner

Hi, @emilk! Thank you for participation. It's good idea, I made the required changes, see commits. New version already in https://crates.io/crates/protoc-prebuilt.

@emilk
Copy link
Author

emilk commented May 30, 2023

Wow, amazing, thank you!

emilk added a commit to rerun-io/rerun that referenced this issue May 31, 2023
### What
Users need the protobuffer compiler `ptooc` installed to run the
objectron example. There is a crate for that!

https://github.com/sergeiivankov/protoc-prebuilt

(and it has a very responsive maintainer:
sergeiivankov/protoc-prebuilt#1)

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2280
emilk added a commit to rerun-io/rerun that referenced this issue Jun 15, 2023
### What
Users need the protobuffer compiler `ptooc` installed to run the
objectron example. There is a crate for that!

https://github.com/sergeiivankov/protoc-prebuilt

(and it has a very responsive maintainer:
sergeiivankov/protoc-prebuilt#1)

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants