From 212b1c45852fef2093dc1374875a9393c55eb4b9 Mon Sep 17 00:00:00 2001 From: Richard Bradfield Date: Thu, 6 Oct 2022 17:17:49 +0100 Subject: [PATCH] Prepare for 0.12.0 release --- .github/workflows/ci.yaml | 2 +- .travis-bench | 61 --------------------------------------- CHANGELOG.md | 22 ++++++++++++++ Cargo.toml | 2 +- 4 files changed, 24 insertions(+), 63 deletions(-) delete mode 100755 .travis-bench diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e54e75058..e4902a57a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,7 @@ jobs: rust: - stable - nightly - - 1.53 + - 1.56 features: - default - ssl-openssl diff --git a/.travis-bench b/.travis-bench deleted file mode 100755 index f042258fc..000000000 --- a/.travis-bench +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -kill_child_processes() { - isTopmost=$1 - curPid=$2 - childPids=`ps -o pid --no-headers --ppid ${curPid}` - for childPid in $childPids - do - kill_child_processes 0 $childPid - done - if [ $isTopmost -eq 0 ]; then - disown $curPid &> /dev/null - kill -9 $curPid &> /dev/null - fi -} - -start_bench() { - concurrency=$1 - num=50000 - - # benchmarking nodejs - echo "Benchmarking nodejs (concurrency: ${concurrency})" - (node bench.js) & (sleep 1 ; exec ab -n ${num} -c ${concurrency} http://localhost:9615/ 2> /dev/null | grep "per second") - - # benchmarking tiny-http - echo "Benchmarking tiny-http (concurrency: ${concurrency})" - (./hello_world 1> /dev/null) & (sleep 1 ; exec ab -n ${num} -c ${concurrency} http://localhost:9975/ 2> /dev/null | grep "per second") - - # benchmarking apache2 - echo "Benchmarking apache2 (concurrency: ${concurrency})" - exec ab -n ${num} -c ${concurrency} http://localhost/ 2> /dev/null | grep "per second" - - kill_child_processes 1 $$ -} - -# Ctrl-C trap. Catches INT signal -trap "kill_child_processes 1 $$; exit 0" INT - -# building tiny-http -echo "Building tiny-http" -cargo build --release -rustc --opt-level=3 -Z lto -o hello_world -L target/release -L target/release/deps examples/hello-world.rs - -# building nodejs app -echo "var http = require('http');" > bench.js -echo "http.createServer(function (req, res) {" >> bench.js -echo " res.writeHead(200, {'Content-Type': 'text/plain'});" >> bench.js -echo " res.end(\"hello world\");" >> bench.js -echo "}).listen(9615);" >> bench.js - -# -start_bench 1 -start_bench 2 -start_bench 4 -start_bench 8 -start_bench 16 -start_bench 32 -start_bench 64 - -# cleanup -kill_child_processes 1 $$ diff --git a/CHANGELOG.md b/CHANGELOG.md index 85ec9a5f7..59c5ad9e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changes +## 0.12.0 +* Bumped the minimum compiler version tested by CI to 1.56 - this is necessary due to an increasing number of dependencies + introducing Cargo manifest features only supported on newer versions of Rust. + +* [Add support for UNIX sockets](https://github.com/tiny-http/tiny-http/pull/224) + + Thanks to @ColonelThirtyTwo for adding support for binding to UNIX sockets when creating a tiny-http server. This change + makes a few small breaking API modifications, if you are constructing `ServerConfig` manually you will need to use the new `ListenAddr` + type rather than directly supplying a `net::SocketAddr`. Likewise `Server::server_addr()` will now return an enum that can + represent either a TCP socket or a UNIX socket. + + Finally `Request::remote_addr()` now returns an `Option<&SocketAddr>` as UNIX sockets don't ever have a remote host. + +* [Reduce required dependencies by switching to `httpdate`](https://github.com/tiny-http/tiny-http/pull/228) + + @esheppa replaced our internal HTTPDate type with the `httpdate` library (used extensively in the community by Hyper, Tokio and others) + which reduces our baseline dependency tree from 18 crates to 5! + +* `TestRequest::path` no longer has a `'static` bound, allowing for fuzzers to generate test request paths at runtime. + +* Unpinned `zeroize` so it can float around any stable `^1` version. + ## 0.11.0 * [Add support for Rustls](https://github.com/tiny-http/tiny-http/pull/218) diff --git a/Cargo.toml b/Cargo.toml index ed938223a..1bc685136 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tiny_http" -version = "0.11.0" +version = "0.12.0" authors = ["pierre.krieger1708@gmail.com", "Corey Farwell "] description = "Low level HTTP server library"