Skip to content

Commit

Permalink
Merge pull request #157 from c410-f3r/htttp_2
Browse files Browse the repository at this point in the history
HTTP/2
  • Loading branch information
c410-f3r authored May 4, 2024
2 parents 8312393 + 55857e1 commit f080431
Show file tree
Hide file tree
Showing 231 changed files with 15,398 additions and 5,171 deletions.
2 changes: 0 additions & 2 deletions .cargo/config.toml

This file was deleted.

10 changes: 4 additions & 6 deletions .github/workflows/bencher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ on:

jobs:
benchmark_with_bencher:
continue-on-error: true
name: Continuous Benchmarking with Bencher
runs-on: ubuntu-latest
env:
BENCHER_ADAPTER: rust_bench
BENCHER_PROJECT: wtx
BENCHER_TESTBED: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- name: Track Benchmarks with Bencher
run: |
bencher run \
--branch "$GITHUB_REF_NAME" \
--branch main \
--err \
--token "${{ secrets.BENCHER_API_TOKEN }}" \
--project wtx \
--testbed ubuntu-latest \
"cargo bench --all-features"
10 changes: 5 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
override: true
profile: minimal
toolchain: nightly-2023-10-15
toolchain: nightly-2024-04-27
- uses: Swatinem/rust-cache@v2
- run: .scripts/autobahn-fuzzingclient.sh ci

Expand All @@ -26,7 +26,7 @@ jobs:
with:
override: true
profile: minimal
toolchain: nightly-2023-10-15
toolchain: nightly-2024-04-27
- uses: Swatinem/rust-cache@v2
- run: .scripts/autobahn-fuzzingserver.sh ci

Expand All @@ -38,7 +38,7 @@ jobs:
with:
override: true
profile: minimal
toolchain: nightly-2023-10-15
toolchain: nightly-2024-04-27
- uses: actions-rs/[email protected]
with:
crate: cargo-fuzz
Expand All @@ -53,7 +53,7 @@ jobs:
with:
override: true
profile: minimal
toolchain: nightly-2023-10-15
toolchain: nightly-2024-04-27
- uses: Swatinem/rust-cache@v2
- run: docker-compose -f .test-utils/docker-compose.yml up -d
- run: sleep 30
Expand All @@ -69,6 +69,6 @@ jobs:
components: clippy, rustfmt
override: true
profile: minimal
toolchain: nightly-2023-10-15
toolchain: nightly-2024-04-27
- uses: Swatinem/rust-cache@v2
- run: .scripts/internal-tests.sh
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.scripts/autobahn/reports
.vscode
**/*.rs.bk
**/artifacts
**/corpus
**/hpack-test-case
**/profile.json
**/proptest-regressions
**/rustc-ice-*.txt
**/target
**/target
profile.json
wtx-docs/book
wtx-docs/book
wtx-fuzz/artifacts
wtx-fuzz/corpus
7 changes: 4 additions & 3 deletions .scripts/autobahn-fuzzingclient.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ fi;

## fuzzingclient

cargo build --bin autobahn-server --features atoi,flate2,simdutf8,tokio,web-socket-handshake --profile bench
cargo run --bin autobahn-server --features atoi,flate2,simdutf8,tokio,web-socket-handshake --profile bench & cargo_pid=$!
cargo build --bin autobahn-server --features async-send,flate2,optimization,pool,tokio,web-socket-handshake --profile bench
cargo run --bin autobahn-server --features async-send,flate2,optimization,pool,tokio,web-socket-handshake --profile bench & cargo_pid=$!
sleep 1
mkdir -p .scripts/autobahn/reports/fuzzingclient
podman run \
-p 9070:9070 \
-v .scripts/autobahn/fuzzingclient-min.json:/fuzzingclient.json:ro \
-v .scripts/autobahn:/autobahn \
--name fuzzingclient \
--net=host \
--network host \
--rm \
docker.io/crossbario/autobahn-testsuite:0.8.2 wstest -m fuzzingclient -s fuzzingclient.json
podman rm --force --ignore fuzzingclient
Expand Down
4 changes: 2 additions & 2 deletions .scripts/autobahn-fuzzingserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "$ARG" != "ci" ]; then
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
fi;

cargo build --bin autobahn-client --features atoi,flate2,simdutf8,tokio,web-socket-handshake --profile bench
cargo build --bin autobahn-client --features flate2,optimization,tokio,web-socket-handshake --profile bench
mkdir -p .scripts/autobahn/reports/fuzzingserver
podman run \
-d \
Expand All @@ -16,7 +16,7 @@ podman run \
--net=host \
docker.io/crossbario/autobahn-testsuite:0.8.2 wstest -m fuzzingserver -s fuzzingserver.json
sleep 5
cargo run --bin autobahn-client --features atoi,flate2,simdutf8,tokio,web-socket-handshake --profile bench
cargo run --bin autobahn-client --features flate2,optimization,tokio,web-socket-handshake --profile bench
podman rm --force --ignore fuzzingserver

if [ $(grep -ci "failed" .scripts/autobahn/reports/fuzzingserver/index.json) -gt 0 ]
Expand Down
3 changes: 2 additions & 1 deletion .scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export rt='rust-tools --template you-rust'

export CARGO_TARGET_DIR="$($rt target-dir)"
export RUST_BACKTRACE=1
export RUSTFLAGS="$($rt rust-flags)"
export RUST_LOG=debug
export RUSTFLAGS="$($rt rust-flags -Asingle-use-lifetimes,-Aunsafe-code)"
2 changes: 1 addition & 1 deletion .scripts/integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. "$(dirname "$0")/common.sh" --source-only

export DATABASE_URI='postgres://wtx_md5:wtx@localhost:5432/wtx'
export RUSTFLAGS="$($rt rust-flags -Asingle-use-lifetimes,-Alet-underscore-drop)"
export RUST_LOG=info

cargo test --all-features --release -- --test-threads=1

Expand Down
37 changes: 15 additions & 22 deletions .scripts/internal-tests.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
#!/usr/bin/env bash

set -euxo pipefail

cargo install rust-tools --git https://github.com/c410-f3r/regular-crates

rt='rust-tools --template you-rust'

export CARGO_TARGET_DIR="$($rt target-dir)"
export RUST_BACKTRACE=1
export RUST_LOG=debug
export RUSTFLAGS="$($rt rust-flags -Asingle-use-lifetimes,-Alet-underscore-drop)"
. "$(dirname "$0")/common.sh" --source-only

$rt rustfmt
$rt clippy

cargo miri test -p wtx

# WTX

$rt check-generic wtx
Expand All @@ -32,25 +25,28 @@ $rt test-with-features wtx crypto-common
$rt test-with-features wtx database
$rt test-with-features wtx digest
$rt test-with-features wtx embassy-net,_hack
$rt test-with-features wtx embassy-sync
$rt test-with-features wtx embedded-tls
$rt test-with-features wtx fastrand
$rt test-with-features wtx flate2
$rt test-with-features wtx futures
$rt test-with-features wtx futures-lite
$rt test-with-features wtx glommio
$rt test-with-features wtx hashbrown
$rt test-with-features wtx hmac
$rt test-with-features wtx http1
$rt test-with-features wtx http2
$rt test-with-features wtx httparse
$rt test-with-features wtx md-5
$rt test-with-features wtx memchr
$rt test-with-features wtx miniserde
$rt test-with-features wtx nightly
$rt test-with-features wtx orm
$rt test-with-features wtx pool-manager
$rt test-with-features wtx parking_lot
$rt test-with-features wtx pool
$rt test-with-features wtx postgres
$rt test-with-features wtx proptest
$rt test-with-features wtx protobuf
$rt test-with-features wtx rand
$rt test-with-features wtx reqwest
$rt test-with-features wtx ring
$rt test-with-features wtx rkyv,_hack
$rt test-with-features wtx rust_decimal
Expand All @@ -67,6 +63,7 @@ $rt test-with-features wtx sha2
$rt test-with-features wtx simd-json
$rt test-with-features wtx simdutf8
$rt test-with-features wtx smol
$rt test-with-features wtx smoltcp,_hack
$rt test-with-features wtx std
$rt test-with-features wtx test-strategy
$rt test-with-features wtx tokio
Expand Down Expand Up @@ -97,14 +94,10 @@ $rt test-with-features wtx-ui schema-manager
$rt test-with-features wtx-ui schema-manager-dev
$rt test-with-features wtx-ui web-socket

cargo check --bin autobahn-client --features "flate2,web-socket-handshake"
cargo check --bin autobahn-server --features "flate2,web-socket-handshake"
cargo check --bin autobahn-client --features "flate2,optimization,tokio/rt-multi-thread,web-socket-handshake"
cargo check --bin autobahn-server --features "async-send,flate2,optimization,pool,tokio/rt-multi-thread,web-socket-handshake"

cargo check --example database-client-postgres-tokio-rustls --features "_tokio-rustls-client,postgres"
cargo check --example web-socket-client-cli-raw-tokio-rustls --features "_tokio-rustls-client,web-socket-handshake"
cargo check --example web-socket-server-echo-raw-async-std --features "async-std,web-socket-handshake"
cargo check --example web-socket-server-echo-raw-glommio --features "glommio,web-socket-handshake"
cargo check --example web-socket-server-echo-raw-smol --features "smol,web-socket-handshake"
cargo check --example web-socket-server-echo-raw-tokio --features "tokio,web-socket-handshake"
cargo check --example web-socket-server-echo-raw-tokio-rustls --features "_tokio-rustls-server,web-socket-handshake"
cargo check --example web-socket-server-pool-raw-tokio --features "pool-manager,web-socket-handshake"
cargo check --example web-socket-client-raw-tokio-rustls --features "_tokio-rustls-client,web-socket-handshake"
cargo check --example web-socket-server-raw-tokio --features "async-send,pool,tokio,web-socket-handshake"
cargo check --example web-socket-server-raw-tokio-rustls --features "_tokio-rustls-server,web-socket-handshake"
4 changes: 2 additions & 2 deletions .scripts/podman-rm.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
podman container rm wtx_postgres_md5
podman container rm wtx_postgres_scram
podman container rm -fi wtx_postgres_md5
podman container rm -fi wtx_postgres_scram
5 changes: 0 additions & 5 deletions .scripts/wtx-bench-postgres.sh

This file was deleted.

41 changes: 0 additions & 41 deletions .scripts/wtx-bench-web-socket.sh

This file was deleted.

Loading

0 comments on commit f080431

Please sign in to comment.