wasmer/static-web-server-async

wasi

Public
wasmer run wasmer/static-web-server-async

Overview

Static Web Server (or SWS abbreviated) is a very small and fast production-ready web server suitable to serve static web files or assets.

It is focused on lightness and easy to use principles but keeping high performance and safety powered by The Rust Programming Language.

Written on top of Hyper and Tokio runtime. It provides concurrent and asynchronous networking abilities as well as the latest HTTP/1 - HTTP/2 implementations.

It's cross-platform and available for Linux, macOS, Windows and FreeBSD (x86/x86_64, ARM/ARM64) as well as Docker.

static-web-server

Features

  • Built with Rust which is focused on safety, speed and concurrency.
  • Memory safe and very reduced CPU and RAM overhead.
  • Blazing fast static files-serving and asynchronous powered by latest Hyper, Tokio and a set of awesome crates.
  • Single 4MB (uncompressed) and fully static binary with no dependencies (Musl libc). Suitable for running on any Linux distro or Docker container.
  • Optional GZip, Deflate or Brotli compression for text-based web files only.
  • Compression on demand via Accept-Encoding header.
  • Partial Content Delivery support for byte-serving of large files.
  • Optional Cache Control headers for assets.
  • Termination signal handling with graceful shutdown ability and grace period.
  • HTTP/2 + TLS support.
  • Security headers for HTTP/2 by default.
  • HEAD responses.
  • Lightweight and configurable logging via tracing crate.
  • Customizable number of worker threads.
  • Optional directory listing.
  • CORS support.
  • Basic HTTP Authentication.
  • Customizable HTTP Response Headers for specific file requests via glob patterns.
  • Fallback pages for 404 errors useful for Single-page applications.
  • Run the server as Windows Service.
  • Configurable using CLI arguments, environment variables or a file.
  • Default and custom error pages.
  • First-class Docker support. Scratch and latest Alpine Linux Docker images available.
  • Ability to accept a socket listener as a file descriptor for use in sandboxing and on-demand applications (E.g systemd).
  • Cross-platform. Binaries available for Linux, macOS, Windows & FreeBSD x86_64 / ARM.

Documentation

For more details about the API, usage and examples please have a look at The Documentation Website.

Releases

Notes

  • If you're looking for v1 please go to 1.x branch.
  • If you want to migrate from v1 to v2 please take a look at Migrating from v1 to v2 release.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in current work by you, as defined in the Apache-2.0 license, shall be dual licensed as described below, without any additional terms or conditions.

Feel free to send some Pull request or file an issue.

License

This work is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

© 2019-present Jose Quintana

Serves static files in response to HTTP GET and HEAD requests.


Github
More packages
ayysadmin/static website
ayysadmin avatar
ayysadmin
ayysadmin avatar
ayysadmin
aprashantz/static-site website
Prashant Ghimire
Prashant Ghimire
Prashant Ghimire
Prashant Ghimire
snapfire/test-static website
runelk/test-01-static website
runelk
runelk
runelk
runelk
lovejesus/static-site1-aleluya website
loveJesus cowan, brian
loveJesus cowan, brian
loveJesus cowan, brian
loveJesus cowan, brian