Overview of picoserve
developmentpicoserve is an async no_std HTTP server designed for bare-metal environments. It is heavily inspired by axum and is optimized for embedded runtimes like embassy, specifically targeting hardware like the Raspberry Pi Pico W.
Key Features
- No heap usage: Designed for memory-constrained environments.
- Axum-like Handlers: Handler functions are async functions that accept zero or more extractors as arguments and return a type implementing
IntoResponse. - Data Parsing: Supports Query and Form parsing using
serde. - Response Types: Supports JSON responses, Server-Sent Events (SSE), and Web Sockets.
- Automatic HEAD handling: The
HEADmethod is automatically handled.
Important Limitations & Security
- Breaking Changes: The project is in
0.*.*versioning; API changes may occur. - Input Limits: URL-Encoded strings (in Query and Form parsing) have a maximum length of 1024.
- Security Warning: The server has not undergone extensive stress-testing. It is advised to place it behind a proxy (like
nginx) rather than exposing it directly to the internet. - Serialization Consistency: For large payloads, certain serialization methods (like
DebugValueor JSON) might be called multiple times. You MUST ensure that the output of serialization remains identical during repeated calls with the same value. - Content-Length: The framework does not verify that the actual body length matches the value provided in the
Content-Lengthheader.