start here https://github.com/ry/deno/blob/6b49944da1e7b06aeba04b1c0ded8e3fdb3c436b/src/handlers.rs#L277
prototype implementation here: https://github.com/ry/deno/blob/golang/os.go#L123
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?
Most helpful comment
rustls would mean fewer runtime deps - it doesn't require any DLLs AFAIU.