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|
#124 in HTTP server
116 downloads per month
Used in 6 crates (5 directly)
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
and easy website creation through Markdown and Chute.
See the roadmap or visit our website for more info.
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).
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
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
(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.