Crates.io | ngyn |
lib.rs | ngyn |
version | 0.5.4 |
source | src |
created_at | 2023-09-06 22:46:58.116573 |
updated_at | 2025-01-29 06:30:04.9695 |
description | Modular backend framework for web applications |
homepage | https://ngyn.rs |
repository | https://github.com/ngyn-rs/ngyn |
max_upload_size | |
id | 965742 |
size | 8,669 |
A modern, ergonomic web framework written in Rust for building high-performance web applications.
Ngyn is designed to make building web servers in Rust both enjoyable and productive. It combines ergonomic APIs with performance-focused design, making it suitable for everything from small APIs to large-scale web applications.
(app.get(), /users/{id})
familiar to web developersAdd ngyn to your Cargo.toml
:
[dependencies]
ngyn = "0.5"
tokio = { version = "1", features = ["full"] }
Create a basic web server:
use ngyn::prelude::*;
#[handler]
fn hello() -> &'static str {
"Hello World!"
}
#[tokio::main]
async fn main() {
let mut app = HyperApplication::default();
// Handle all routes and HTTP methods
app.any("*", hello);
println!("Server running at http://127.0.0.1:8080");
let _ = app.listen("127.0.0.1:8080").await;
}
Check out our examples directory for more use cases:
ngyn
: The main framework, reexports all other cratesngyn_macros
: Procedural macros for route handlersngyn_shared
: Core traits and typesngyn-hyper
: Hyper server integrationngyn-websocket
: WebSocket supportngyn-shuttle
: Shuttle.rs deployment service integrationngyn-vercel
: Vercel deployment service integrationNgyn is under active development, with the following features planned for future releases:
Ngyn is designed to be performant while maintaining developer productivity. Some key performance features:
Ngyn thrives on community support and contributions! Here’s how you can get involved:
If Ngyn has been helpful, consider giving it a star on GitHub to support the project!
Please read our Contributing Guide for more details.
Ngyn is under active development. While the core API is stabilizing, some features might change. Production use should be carefully evaluated.
Ngyn is licensed under the MIT License. This allows you to use, modify, and distribute the framework freely in your projects.
We can’t wait to see what you build with Ngyn! 🚀