HTTP Server IO Driver
All IO drivers in the Urbit runtime currently run in the same process, which is called the "urth" or "king" process. As part of an effort to both increase security and scalability in the runtime, we are splitting each IO driver into its own process, which is capable of communicating over local (i.e. pipes) or remote (i.e. TCP sockets) communication channels.
In the IO drivers repo, we use the following abstract model of a driver:
INPUT SOURCE|| serialized request (length-encoded, jammed noun)|+---------------+| INPUT TASK |+---------------+|| deserialized request (noun)|+---------------+| HANDLING TASK |+---------------+|| deserialized response (noun)|+---------------+| OUTPUT TASK |+---------------+|| serialized response (length-encoded, jammed noun)|OUTPUT SINK
For this bounty, you must rewrite the HTTP server IO driver in
pkg/urbit/vere/io/http.c in the Urbit repo to fit the driver model described above in a new module [
src/http/server.rs] in the IO drivers repo with
stdout as the input source and output sink, respectively. The HTTP client driver and file system driver will serve as useful references.
- Knowledge of C and Rust.
- Experience with asynchronous, task-based programming.
- Familiarity with HTTP.
- A thoroughly-documented HTTP server driver implementation in
stdoutas the input source and output sink, respectively.
- A complete suite of unit tests structured as a
src/http/server.rsthat exercises the conversions from request nouns into driver-specific data structures and from driver-specific data structures into response nouns.
- A complete suite of integration tests in
tests/http_server_tests.rsthat run the spawn the HTTP server driver in a separate process and feed it requests as jammed nouns.
Upon completion of all deliverables, you will receive two (2) stars.