Lyra 0.0.1
dotnet add package Lyra --version 0.0.1
NuGet\Install-Package Lyra -Version 0.0.1
<PackageReference Include="Lyra" Version="0.0.1" />
<PackageVersion Include="Lyra" Version="0.0.1" />
<PackageReference Include="Lyra" />
paket add Lyra --version 0.0.1
#r "nuget: Lyra, 0.0.1"
#:package Lyra@0.0.1
#addin nuget:?package=Lyra&version=0.0.1
#tool nuget:?package=Lyra&version=0.0.1
π Lyra - Lightweight, AOT-Ready Web API Framework for .NET
Lyra is a minimal, fast, and AOT-friendly web API framework for C#. Inspired by Express.js, itβs designed for microservices, internal tools, and self-hosted apps that need performance without the bloat.
β Express-like routing and middleware β in pure C#
β Self-hosted withHttpListenerβ no Kestrel or ASP.NET
β AOT-friendly JSON binding β works with source generators
β Lightweight and composable β just one DLL and you're ready
π Why Lyra?
| Feature | Lyra | ASP.NET Minimal API | Express.js |
|---|---|---|---|
| Lightweight & self-hosted | βοΈ | β (Kestrel) | βοΈ |
| AOT-friendly (no reflection) | βοΈ | β οΈ Partial | β |
| Express-like simplicity | βοΈ | β | βοΈ |
| Minimal dependencies | βοΈ | β | βοΈ |
| Good for internal tools/CLI | βοΈ | β | βοΈ |
π Get Started Instantly
You donβt need a package. Just clone the repo and run a sample:
git clone https://github.com/syanmi/Lyra.git
cd Lyra/sandbox/LyraSampleApp/
start /b dotnet run
curl http://localhost:8080/hello
Or create a simple app like this:
var app = new LyraApp();
app.Get("/hello", ctx => LyraResult.Text("Hello from Lyra!"));
await app.RunAsync();
- No NuGet installation needed
- No build templates or scaffolding tools
- Just C# and .NET β ready to go
𧬠AOT-Ready JSON Binding
app.UseJsonContext(MyJsonContext.Default);
[JsonSerializable(typeof(MyRequest))]
public partial class MyJsonContext : JsonSerializerContext {}
- Uses
System.Text.Jsonsource generators - Reflection-free & trimming-friendly
- Ideal for native AOT builds
π§± Middleware and SubApps
var sub = new LyraApp();
sub.Get("/hi", ctx => LyraResult.Text("Hello from SubApp!"));
app.Use(async (ctx, next) =>
{
Console.WriteLine("Before SubApp");
await next();
});
app.Map("/sub", sub);
- Compose multiple apps like Express's
app.use('/path', sub) - Build modular and reusable APIs
π Static File Serving (π§coming soon)
app.UseStaticFiles("wwwroot");
- Serve static files for admin tools or dashboards
π¦ Current Features
| Feature | Status |
|---|---|
| GET/POST Routing | β |
| Path Parameters | β |
| JSON Binding (AOT) | β |
| Middleware | β |
| SubApps | β |
| Static Files | π§ (coming soon) |
| CLI Integration | π§ (coming soon) |
| NuGet Package | π§ (planned for v1.0) |
π Roadmap
| Version | Features |
|---|---|
| v0.1 | Basic routing, responses |
| v0.2 | Path params, body reader |
| v0.3 | ReadBodyAsync<T>() with AOT-ready JSON |
| v0.4 | Middleware, subapps |
| v0.5 | static files |
| v1.0 | Logging, CORS, file download, CLI scaffolding |
CLI tools (
dotnet new lyra) and NuGet packaging are planned for v1.0
π License
MIT License.
Contributions welcome!
β Like Lyra?
If Lyra helps you build faster and smaller .NET apps, a β would mean a lot!
β Summary
Lyra is for developers who want:
- Fast startup and small output size
- Native AOT-ready web APIs
- Express-like simplicity in C#
- No heavy dependencies or runtime costs
π Related
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1 | 173 | 6/19/2025 |