[][src]Macro http_guest::guest_app

macro_rules! guest_app {
    ($user_entrypoint:ident) => { ... };

Macro to set up the scaffolding

This macro takes care of setting up the scaffolding for the guest code, including allocation, error handling, and conversion to and from the http crate's types. The template for user code should look something like this:

extern crate http_guest;

use http_guest::{Request, Response};

pub fn user_entrypoint(req: &Request<Vec<u8>>) -> Response<Vec<u8>> {
    if req.method().as_str() == "POST" {
    } else {