Skip to content
@http-wasm

http-wasm

HTTP server middleware implemented in WebAssembly

Welcome to http-wasm

This organization includes repositories that help you manipulate HTTP messages with WebAssembly. Specifically, this is server-side middleware described in the overview section.

Overview

WebAssembly has a virtual machine architecture where the host is the embedding process and the guest is a program compiled into the WebAssembly Binary Format, also known as Wasm. The Abstract Binary Interface (ABI) is the contract between the host and the guest, primarily defining functions each side can import.

Let's take an example of a program that embeds an HTTP processor. This processor has a chain of middleware that allows it to customize or change requests and responses. Middleware in Wasm can be included in this chain.

 .----------------------. 
|                        |
|  .------------------.  |
| | HTTP Processor     | |
|  '------+-----------'  | 
|         |  ^           |
|         v  |           |
|  .---------+--------.  |
| | Native Middleware  | |
|  '------+-----------'  | 
|         |  ^           |
|         v  |           |
|  .---------+--------.  |
| | Wasm Middleware    | |
| |                    | |
| | .-----.    .-----. | |
| || Host  |  | Guest || |
| ||       +->|       || |
| ||       |<-+       || |
| | '-----'    '-----' | |
|  '------+-----------'  | 
|         |  ^           |
|         v  |           |
|  .---------+--------.  |
| | Native Middleware  | |
|  '------------------'  | 
|                        |
 '----------------------' 

The Wasm Middleware host is written in native code, and compiled into the application. For example, this code could use wazero as the WebAssembly runtime, if the host was written in Go, or V8, if C++.

The Wasm Middleware guest can be written in any language that supports the ABI in use by the host. For example, the middleware could be programmed in C (ex. Rust) or Go (ex. TinyGo).

While native middleware often require rebuilding the program from source, users of Wasm middleware are free to swap out implementations decoupled from any changes to the binary. WebAssembly is a sand-boxed architecture, so the host process can safely run code defined externally.

Popular repositories Loading

  1. http-wasm-host-go http-wasm-host-go Public

    HTTP middleware libraries implemented by http-wasm WebAssembly Guest modules

    Go 34 11

  2. http-wasm-guest-tinygo http-wasm-guest-tinygo Public

    HTTP Middleware library for TinyGo used to compile WebAssembly Guest modules

    Go 17 8

  3. http-wasm http-wasm Public

    ABI for http-wasm

    Makefile 7 4

  4. http-wasm-host-js http-wasm-host-js Public

    HTTP middleware libraries for JS implemented by http-wasm WebAssembly Guest modules

    TypeScript 4 3

  5. .github .github Public

  6. mosn mosn Public

    Forked from mosn/mosn

    The Cloud-Native Network Proxy Platform

    Go

Repositories

Showing 8 of 8 repositories
  • http-wasm-host-go Public

    HTTP middleware libraries implemented by http-wasm WebAssembly Guest modules

    http-wasm/http-wasm-host-go’s past year of commit activity
    Go 34 Apache-2.0 11 1 1 Updated Jun 14, 2024
  • http-wasm-guest-tinygo Public

    HTTP Middleware library for TinyGo used to compile WebAssembly Guest modules

    http-wasm/http-wasm-guest-tinygo’s past year of commit activity
    Go 17 Apache-2.0 8 1 1 Updated Feb 22, 2024
  • http-wasm Public

    ABI for http-wasm

    http-wasm/http-wasm’s past year of commit activity
    Makefile 7 Apache-2.0 4 7 0 Updated Oct 31, 2023
  • http-wasm-tck Public

    Standalone runner for the http-wasm TCK

    http-wasm/http-wasm-tck’s past year of commit activity
    Go 0 Apache-2.0 3 0 0 Updated Aug 18, 2023
  • mosn Public Forked from mosn/mosn

    The Cloud-Native Network Proxy Platform

    http-wasm/mosn’s past year of commit activity
    Go 0 Apache-2.0 804 0 0 Updated Aug 8, 2023
  • http-wasm-guest-go Public

    HTTP libraries compatible with TinyGo target=wasi and Go 1.21+ GOOS=js

    http-wasm/http-wasm-guest-go’s past year of commit activity
    0 Apache-2.0 1 0 0 Updated Jul 22, 2023
  • http-wasm-host-js Public

    HTTP middleware libraries for JS implemented by http-wasm WebAssembly Guest modules

    http-wasm/http-wasm-host-js’s past year of commit activity
    TypeScript 4 Apache-2.0 3 0 0 Updated Dec 21, 2022
  • .github Public
    http-wasm/.github’s past year of commit activity
    0 Apache-2.0 0 0 0 Updated Sep 22, 2022

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…