Crate mikrozen

Source
Expand description

§mikrozen

A minimal, extensible, and WASM-first micro-framework for routing and response handling.

§Features

  • Simple router and response macros
  • WASM and no_std compatible
  • Uses dlmalloc as the global allocator for production-ready WebAssembly applications

§Example

#![no_std]
extern crate alloc;

use mikrozen::prelude::*;

fn hello(args: Input) -> Output {
    let name = args.get_str("name");
    response! {
        "message" => format!("Hello, {}", name),
        "success" => true,
    }
}

router! {
    "hello" => hello,
}

§Global Allocator

This crate uses dlmalloc as the global allocator, which is a production-ready allocator based on the reliable dlmalloc implementation used by emscripten.

Modules§

prelude

Macros§

response
router

Structs§

RouterInput

Type Aliases§

Input
Output