hyper-hello-world

Crates.iohyper-hello-world
lib.rshyper-hello-world
version0.1.1
sourcesrc
created_at2018-09-11 00:45:15.71471
updated_at2018-09-24 21:42:18.719518
descriptionRust Hyper's hello world example with explanations for C devs
homepagehttps://github.com/Densaugeo/hyper-hello-world
repositoryhttps://github.com/Densaugeo/hyper-hello-world
max_upload_size
id84033
size8,648
Densaugeo (Densaugeo)

documentation

README

hyper-hello-world

Rust Hyper's hello world example with explanations for C devs

License: MIT

Purpose

When I saw Hyper's hello world example, I wondered what all those closures and futures were doing, so I rewrote in a more traditional style and stripped out the syntax sugar. In this repo are four source files, beginning with the original hello world in base.rs and progressivley explicating parts until reaching full.rs.

Building and Running

# Build all four binaries
cargo build

# Run each binary, from original example to most explicit
cargo run --bin base
cargo run --bin fn
cargo run --bin fn-error
cargo run --bin full

# Check server for response
curl 127.0.0.1:3000

TODO

  • Can it print the startup message after starting?
  • Not-unit test?
Commit count: 11

cargo fmt