Skip to main content

Crate nsgi

Crate nsgi 

Source
Expand description

§NSGI — Native Web Server Gateway Interface

This crate provides the C ABI types and function pointer signature that form the NSGI protocol. It is #![no_std] and has zero dependencies.

NSGI is a language-agnostic gateway interface protocol that connects any C ABI host with application logic written in any language supporting FFI.

§NSGI String Data Convention

All text and data fields in this protocol are represented as a pair: a raw byte pointer (*const u8) and a length (usize). They are NOT null-terminated. Both the host and the application must rely entirely on the companion _len field to determine the extent of the data; never pass these pointers to functions that expect C strings.

Structs§

NsgiHeader
A single HTTP header name/value pair, stored as raw byte slices.
NsgiRequest
An HTTP request constructed by the host and passed to the application.
NsgiResponse
An HTTP response produced by the application and returned to the host.

Type Aliases§

NsgiApp
The canonical type signature of an NSGI application entry point.
NsgiFreeResponse
The canonical type signature of the NSGI response cleanup function.