#web #web-server #web-application #web-framework


A forward-thinking fast web server designed to fit your needs, efficiently

4 releases (2 breaking)

0.5.0 Aug 29, 2022
0.4.1 May 26, 2022
0.4.0 Apr 24, 2022
0.3.0 Nov 5, 2021
0.0.0 Mar 31, 2021

#124 in HTTP server

Download history 13/week @ 2022-11-28 23/week @ 2022-12-05 36/week @ 2022-12-12 32/week @ 2022-12-19 22/week @ 2022-12-26 10/week @ 2023-01-02 22/week @ 2023-01-09 10/week @ 2023-01-16 39/week @ 2023-01-23 57/week @ 2023-01-30 12/week @ 2023-02-06 38/week @ 2023-02-13 48/week @ 2023-02-20 8/week @ 2023-02-27 25/week @ 2023-03-06 16/week @ 2023-03-13

116 downloads per month
Used in 6 crates (5 directly)



crates.io version lines of code license CI status open issues dependency status commit activity


An extensible and efficient forward-thinking web server.

Kvarn is an extendable backend library with native async everywhere; zero downtime; and safe & fast defaults.

Kvarn is batteries-included (optional defaults) with support for reverse proxying, auto HTTP/2 push, in-memory caching (proper cache invalidation), server communication through kvarnctl, and easy website creation through Markdown and Chute.

See the roadmap or visit our website for more info.

Current state

A stable API is available and the crate is on crates.io. You can view the latest documentation online.

At least for now you'll have to configure Kvarn through code (e.g. add extensions from kvarn_extensions and configuring hosts).

To use the latest and greatest (with regular breaking changes, follow the progress at the reference implementation for solutions) you can add Kvarn using this Git repo.


To increase security, build-times, reliability, and speed, I use the minimal reasonable number of dependencies.

The two heavy-hitters are tokio (async runtime for async networking, file access, and extensions) and rustls (for encryption, optional if you want to run a unsafe (often local) web server). brotli and flate2 are enabled by default to provide compression, but can be turned off. h2 provides optional (but strongly preferred) support for the HTTP/2 protocol.

See kvarn.org for more details.

Pushing to production

Take a look at the sample.service for how to configure systemd to use kvarnctl to manage Kvarn.

You can now use systemctl --user reload kvarn or similar to reload the server if you've recompiled. This ensures (exceptions) NO downtime. Not even a few milliseconds.


If you want to download the .rlib files, they are published in actions after each good commit. Click the topmost run for Kvarn or Kvarn extensions and download the appropriate artefact.

For Kvarn chute downloads for Linux, go here and download the artefact from the topmost job.

kvarnctl is also available as CI builds.


Documentation of the main branch can be found at doc.kvarn.org.

To document with information on which cargo features enables the code, set the environment variable RUSTDOCFLAGS to --cfg docsrs (e.g. in Fish set -x RUSTDOCFLAGS "--cfg docsrs") and then run cargo +nightly doc.


See the changelog.


This library, and all other sub-projects, are distributed under the Apache License 2.0. So must all contributions also be.

Images and logos are under my copyright unless explicitly stated otherwise. You are free to use them if reasonable credit is given. I reserve the right to order you to remove any use at will.


~261K SLoC