conduit-rust/conduit

Thoughts

Closed this issue · 0 comments

reem commented

As requested by @wycats on IRC, here are some of my thoughts on what conduit should change/adapt so that it can be a stable standard for Rust web development:

Primarily Conduit needs to decide whether it is a "raw" specification for relatively low-level HTTP implementations or a high level specification for full web applications to use directly.

  • Conduit needs to have external dependencies - putting everything in core just makes maintenance and future upgrade harder.
  • Method extensions being &'static str is problematic, since incoming requests will always produce non-'static strings.
  • Request should:
    • Contain a typed Url struct instead of scheme, host, virtual_root, path, and query_string.
    • Either use a more full-flegded extension infrastructure like rust-plugin or not include extensions.
  • Headers should:
    • Have more convenience methods.
    • Depending on the overall direction of Headers, either remain raw or grow a typed representation.
  • If conduit is meant to be used directly, Handler should use a better error trait than Show
  • Response should support streaming data directly over an incoming stream without allocation.
  • Status should be a strongly-typed enum with an auto-generated .phrase() method.

I'm not sure what the future of conduit is. It's entirely possible that it could develop a really nice high level interface and be used by all higher level frameworks - however, it's also possible that it could tie itself to a complex interface which frameworks decide they don't want all of and that could further fragment Rust web dev.