Velto 1.0.1 release

⚓ Rust    📅 2025-09-05    👤 surdeus    👁️ 2      

surdeus

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Velto 1.0.1 release

velto 1.0.1

Version 1.0.1 of Velto has been released. Velto 1.0.1 makes the framework fully async, with live reload while staying with minimal boilerplate.

Velto 1.0.1 and 0.1.2 Comparison

- use velto::prelude::*;
-
- fn homepage(_req: &Request) -> Response<Cursor<Vec<u8>>> {
-    render!("index.html", {
-        "title" => "Welcome",
-        "message" => "Hello, Velto!"
-    })
- }
- 
- fn main() {
-     let mut app = App::new();
-     route!(app, "/" => homepage);
-     app.serve_static("static");
-     app.run("127.0.0.1:8080");
- }

+ use velto::prelude::*;
+
+ fn homepage(_req: &Request) -> Response {
+    render!("index.html", {
+        "title" => "Welcome",
+        "message" => "Hello, Velto!"
+    })
+ }
+
+ #[tokio::main]
+ async fn main() -> std::io::Result<()> {
+     let mut app = App::new();
+     // app.enable_dev_mode();  Uncomment to enable dev mode
+     route!(app, "/" => homepage);
+     app.serve_static("static");
+     app.run("127.0.0.1:8080").await
+ }

Links

Github
Crates.io

Notes

  1. Velto is now fully async, powered by async_tiny, an async implementation of tiny_http (async_tiny is not at all complete yet).
  2. Live reload has been added, using the notify, tokio-tungstenite, tungstenite, tokio and futures-util crates
  3. Path traversal is protected against using pathx::Normalize

Feedback is welcome.

1 post - 1 participant

Read full topic

🏷️ Rust_feed