kvarn 0.5.0

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

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

Kvarn

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.

Dependencies

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.

Downloads

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

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.

Changelog

See the changelog.

Contributing

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.