Deno: import via http

Created on 26 Jul 2018  路  5Comments  路  Source: denoland/deno

Most helpful comment

rustls would mean fewer runtime deps - it doesn't require any DLLs AFAIU.

All 5 comments

I started a little something using reqwest to synchronously fetch from http.

We'll see later on if we migrate from reqwest to hyper for asynchronous code fetching.

@NewLunarFire Awesome! It makes more sense to do this on the event loop from the start - also I'm leaning towards RusTLS instead of native-tls. Do you have any opinion on this? Basic tokio support will be added in #434 - this work should be done on top of that.

I think we should keep dependencies lean. Unless there is a compelling argument to use RusTLS over native-tls I think we should keep native-tls.

rustls would mean fewer runtime deps - it doesn't require any DLLs AFAIU.

reqwest seems to depend on native-tls, so I might switch to hyper and just wait on the future it returns:
https://github.com/seanmonstar/reqwest/blob/a25f62f4cb9e5cf839306141374133a272d9d8f7/src/lib.rs#L239

So I'll probably go for hyper + hyper-rustls + rustls. I'll take me some time though.

@ry I'm worried about the amount of dependencies I'm introducing in deno by using hyper. I'd be adding about 20 crates to this project, 30-40 if I add the dev and optional crates, which I didn't plan on adding for now. even more than the tokio crates we're adding for timers. Also, it seems I have to manually add each of them in build.gn and build_extra/rust/BUILD.gn, is this normal or am I forgetting a step?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

justjavac picture justjavac  路  3Comments

kyeotic picture kyeotic  路  3Comments

metakeule picture metakeule  路  3Comments

ry picture ry  路  3Comments

motss picture motss  路  3Comments