Skip to content

Commit

Permalink
bump: v0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Jan 12, 2024
1 parent 3392b2d commit 658fb86
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ members = [
]

[workspace.package]
version = "0.7.1"
version = "0.7.2"
authors = ["Fangdun Tsai <[email protected]>"]
edition = "2021"
homepage = "https://viz.rs"
Expand All @@ -49,10 +49,10 @@ license = "MIT"
rust-version = "1.75"

[workspace.dependencies]
viz = { version = "0.7.1", path = "viz" }
viz-core = { version = "0.7.1", path = "viz-core" }
viz-router = { version = "0.7.1", path = "viz-router" }
viz-handlers = { version = "0.7.1", path = "viz-handlers", default-features = false }
viz = { version = "0.7.2", path = "viz" }
viz-core = { version = "0.7.2", path = "viz-core" }
viz-router = { version = "0.7.2", path = "viz-router" }
viz-handlers = { version = "0.7.2", path = "viz-handlers", default-features = false }
viz-macros = { version = "0.2.0", path = "viz-macros" }
viz-test = { version = "0.2.0", path = "viz-test" }
viz-tower = { version = "0.1.0", path = "viz-tower" }
Expand Down
97 changes: 97 additions & 0 deletions viz-smol/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<p align="center">
<img src="https://raw.githubusercontent.com/viz-rs/viz-rs.github.io/gh-pages/logo.svg" height="200" />
</p>

<h1 align="center">
<a href="https://viz.rs">Viz</a>
</h1>

<div align="center">
<p><strong>Fast, robust, flexible, lightweight web framework for Rust</strong></p>
</div>

<div align="center">
<!-- Safety -->
<a href="/">
<img src="https://img.shields.io/badge/-safety!-success?style=flat-square"
alt="Safety!" /></a>
<!-- Docs.rs docs -->
<a href="https://docs.rs/viz">
<img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square"
alt="Docs.rs docs" /></a>
<!-- Crates version -->
<a href="https://crates.io/crates/viz">
<img src="https://img.shields.io/crates/v/viz.svg?style=flat-square"
alt="Crates.io version" /></a>
<!-- Downloads -->
<a href="https://crates.io/crates/viz">
<img src="https://img.shields.io/crates/d/viz.svg?style=flat-square"
alt="Download" /></a>
<!-- Codecov -->
<a href="https://app.codecov.io/gh/viz-rs/viz">
<img src="https://img.shields.io/codecov/c/github/viz-rs/viz?style=flat-square"
alt="Codecov" /></a>
<!-- Discord -->
<a href="https://discord.gg/m9yAsf6jg6">
<img src="https://img.shields.io/discord/699908392105541722?logo=discord&style=flat-square"
alt="Discord"></a>
</div>

## Features

- **Safety** `#![forbid(unsafe_code)]`

- Lightweight

- Robust `Routing`

- Handy `Extractors`

- Simple + Flexible `Handler` & `Middleware`

- Supports Tower `Service`

## Hello Viz

```rust
use std::io;
use std::sync::Arc;

use async_net::TcpListener;
use macro_rules_attribute::apply;
use viz_smol::{Request, Result, Router};

async fn index(_: Request) -> Result<&'static str> {
Ok("Hello, Viz!")
}

#[apply(smol_macros::main!)]
async fn main(ex: &Arc<smol_macros::Executor<'_>>) -> io::Result<()> {
// Build our application with a route.
let app = Router::new().get("/", index);

// Create a `smol`-based TCP listener.
let listener = TcpListener::bind(("127.0.0.1", 3000)).await.unwrap();
println!("listening on {}", listener.local_addr().unwrap());

// Run it
viz_smol::serve(ex.clone(), listener, app).await
}
```

More examples can be found
[here](https://github.com/viz-rs/viz/tree/main/examples).

## Get started

Open [Viz.rs](https://viz.rs), select language or version.

## License

This project is licensed under the [MIT license](LICENSE).

## Author

- [@fundon@fosstodon.org](https://fosstodon.org/@fundon)

- [@\_fundon](https://twitter.com/_fundon)

0 comments on commit 658fb86

Please sign in to comment.