I've just published two libraries I think some of you in the community would like to use. Both awaiting merging into Nimble package list.
https://github.com/Niminem/sse
A spec-compliant Server-Sent Events library for Nim. Stdlib only, no external dependencies, no std/httpclient either (HTTP is done by hand over sockets).
NOTE: For making SSE servers I only included helpers. In this way, you're not boxed in to an implementation. For client-side we have async using Nim's standard async implementation but we also have a purely synchronous version in case you'd like to use threads. Added bonus is a 'cancelToken' so you can stop mid-stream. Those building some sort of chat app or similar may find that useful.
https://github.com/Niminem/jschema
A spec-compliant JSON Schema (draft 2020-12) validator and builder for Nim.
NOTE: This is stdlib only as well. No deps aside from the PCRE (regex) DLL or whatever it's called. Which comes installed with Nim. Just something to be mindful of if you're shipping something- you'll need that alongside your binary.
---
So I'm building a coding agent from scratch and needed these libraries. SSE for streaming and Json Schema building / validation for LLM tool calling.
Instead of just building the minimum for what LLM providers need with both libraries, I chose to go all in and build them against the specs since they're available and we don't have them in our ecosystem yet. Because supply chain attacks are on the rise and largely through dependencies becoming a super common attack vector, I also made the choice to use stdlib only.
They are going to be used in commercial applications and will be maintained.
If you run into any issues please let me know or make a PR, I've tested as much as humanly possible prior to making the repos public.