Skip to content

About

PicoServer官方文档托管仓库

Resources

Security policy

Stars

4 stars

Watchers

1 watching

Forks

Repository files navigation

NuGet version NuGet downloads

PicoServer

Lightweight .NET Web Capability Glue Library

Lightweight · Hassle-free · Cross-platform · Zero-dependency · AOT · High-performance · Glue Features

English | 中文


PicoServer is a lightweight Web capability glue library built on .NET Standard 2.0. A single DLL of only tens of KB with no third-party dependencies — add Web capabilities to any .NET application with just a few lines of code.

Core Concept: .NET Application + PicoServer = Web-Enabled Application

Features

  • 📦 Extremely Lightweight — Single DLL of only tens of KB, zero dependencies, works out of the box
  • ⚡ Native AOT Compilation — Fully async non-blocking, native AOT support, millisecond startup
  • 🌍 Full Compatibility — .NET Framework 4.6.1+ through .NET 10+, cross-platform Linux, Windows, macOS
  • 🔌 One-Line WebAPI — AddRoute + StartServer, as natural as calling a method
  • 🔄 WebSocket — Full-duplex communication, heartbeat detection, broadcast push, tested at tens of thousands of connections
  • 🔐 Token / JWT Authentication — Built-in simple token and JWT auth
  • 📁 Static File Hosting — Caching strategies, MIME detection, CORS configuration, SPA support, native anti-directory traversal protection
  • 🧩 Custom Middleware — AddMiddleware fully open, sequential execution, on-demand registration

Quick Start

dotnet add package PicoServer
var app = new WebAPIServer();
app.MapGet("/", (req, rsp) => rsp.WriteAsync("Hello PicoServer"));
app.StartServer();

Full Documentation

For complete usage guides, API examples, and performance benchmark reports, visit: PicoServer Official Docs

License

Free for commercial use — complete core functionality without limits.

Use Cases

  • (原创)[C#]【开源】一分钟使用 PicoServer 打造日志服务器
  • 《MAUI 嵌入式 Web 架构实战》— PicoServer 轻量级跨平台 Web 服务方案
  • An industrial IoT user deployed PicoServer on a Buildroot embedded Linux with 64MB RAM, using AOT compilation for device Web management, data acquisition, and IIoT networking — effectively reducing costs.
  • An apparel industry user leveraged PicoServer's minimalist WebAPI to build internal applications for web-based order production tracking.
  • Written Authorization System: supports user management, order management, online payment and collection — fully automated product sales.
  • A Spanish company used PicoServer + H5 to completely rebuild a WinForms project, enabling cross-platform deployment and reducing development and maintenance costs.
  • An enterprise smoothly migrated its microservices from NancyFx to PicoServer. Under over one million daily requests, CPU usage remains at just 5%, with stable memory and no leaks. The user commented that it is "very stable."

Contact

About

PicoServer官方文档托管仓库

Resources

Security policy

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages