rust-web-server 18.9.0

Single-binary web server and reverse proxy: automatic HTTPS (Let's Encrypt), HTTP/1.1, HTTP/2 and HTTP/3, load balancing, auth and rate limiting, configured in one TOML file. Also a Rust library: routing, middleware, MCP server, ORM, background jobs. No hyper, no Tower; HTTP/2 and HTTP/3 framing via h2 and quinn.
Documentation
name: nixpkgs expression for a release

# Fills packaging/nix/package.nix for a release tag — version, source hash,
# cargoHash — builds it as nixpkgs would (from the tag on GitHub) and keeps
# the result as an artifact, ready for the nixpkgs PR (RELEASE.md).
on:
  workflow_dispatch:
    inputs:
      tag:
        description: Release tag, e.g. 18.2.0
        required: true

jobs:
  package:
    runs-on: ubuntu-latest
    env:
      TAG: ${{ inputs.tag }}
    steps:
      - uses: actions/checkout@v4
      - uses: cachix/install-nix-action@v31.11.1
        with:
          nix_path: nixpkgs=channel:nixos-unstable
      - name: Fill in and build
        run: |
          f=packaging/nix/package.nix
          sed -i "s/^  version = \".*\";/  version = \"$TAG\";/" "$f"
          raw=$(nix-prefetch-url --unpack "https://github.com/bohdaq/rust-web-server/archive/refs/tags/$TAG.tar.gz" 2>/dev/null)
          src=$(nix hash convert --hash-algo sha256 --to sri "$raw")
          sed -i "0,/hash = lib.fakeHash;/s||hash = \"$src\";|" "$f"
          # The fake cargoHash makes the vendor step fail with the real one.
          cargo=$(nix-build packaging/nix/release.nix 2>&1 | awk '/got:/ {print $2; exit}')
          test -n "$cargo"
          sed -i "s|cargoHash = lib.fakeHash;|cargoHash = \"$cargo\";|" "$f"
          nix-build packaging/nix/release.nix
          ./result/bin/rws --version
          cat "$f"
      - uses: actions/upload-artifact@v4
        with:
          name: package.nix
          path: packaging/nix/package.nix