#PicoServer.Nano packaging & questions

1 messages · Page 1 of 1 (latest)

wide veldt
#

Hi everyone, I'm the author of PicoServer. PicoServer is a lightweight web "glue" library in the .NET ecosystem, simple to use,Published on NuGet. I'm currently working on the nanoFramework port, PicoServer.Nano, which allows running lightweight web services on ESP32 with C#.

On ESP32-S3, it's currently stable at 6 concurrent connections, ~26 QPS, and ~210ms latency.

A few questions:

  1. For packaging an nfproj project as a NuGet package with dependencies on System.Net.Http and nanoFramework.CoreLibrary, what's the preferred official method – dotnet pack or nuget pack? Do dependencies need to be explicitly listed in a .nuspec file?

  2. req.Url.AbsolutePath throws InvalidOperationException in early middleware stages, but works fine in route handlers. Does the official guidance suggest avoiding Url entirely at early stages and using RawUrl with manual path parsing instead?

  3. When will List<T> be fully supported in nanoFramework? Currently middleware storage requires ArrayList and explicit casts – are there better alternatives?

Thanks!

hazy root
#

Nice! Looking forward to see this published. 🙂
Please DM me so we can amplify announcement and similar actions 😉

#

You can check any of our libraries for the nuspec format we're using.

#
  1. Generics is in public preview right now. List<T> is already available in Sys.Collections nuget
    If you want to release a preview version with the V2 of the libraries, just reference preview AND make sure to also install the preview version of the VS extension (required for building). Devices have to be flashed with preview fw versions too.
#
  1. Can think on any obvious reason for that... have you tried debug the HTTP lib code?
nocturne moss
wide veldt
# nocturne moss And how different is it from the WebServer?

PicoServer is a lightweight, cross-platform web "glue" library in the .NET ecosystem. It's a single DLL with zero dependencies, only a few dozen KB, and can be embedded into any .NET application without relying on IIS or Kestrel. It's simple to integrate, non-intrusive to business logic, high-performance, and low-resource.

It fits lightweight Web APIs, WebSocket real-time communication, edge computing services, various gateways, and even lightweight streaming media servers.

I'm currently porting it to nanoFramework (PicoServer.Nano). The nano version avoids reflection to save resources — leaving more room for your business logic. It's simple to use with no complex abstractions. One line of code to add a Web API, as natural as writing a method:

app.AddRoute("/hello", async (req, resp) => await resp.WriteAsync(@"{""code"":1,""msg"":""Hello PicoServer WebAPI""}"));

I see the official WebServer as the complete solution. PicoServer.Nano is more like a lightweight placeholder for MCU scenarios where resource efficiency matters most.

NuGet: https://www.nuget.org/packages/PicoServer/
Docs: https://docs.picoserver.cn/

Happy to hear your thoughts.

supple cargo
#

The link to the source code page is not accessible. How is library licensed?

wide veldt
supple cargo
#

So it is close source but free to use.