-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b8c0097
Showing
1,590 changed files
with
52,456 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/target | ||
**/*.rs.bk | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "boringssl"] | ||
path = deps/boringssl | ||
url = https://github.com/google/boringssl.git | ||
ignore = dirty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
env: | ||
global: | ||
- secure: "Aa+7RLfRyfdH2ENH0fyjI7Waq7/9XSk1LP6sDwG0zG1uhmus/z0QaiaCd027mFY3V25Kzfd6TVzL92dp3U63+3Qn3hHle3oNdu1jqaSBHB1L7R+IS6tLW0Bny5Zd7mMRNbVO642qvmuZo8A5nuu/WHp3w91WI4rp1rhULm/uhQ/+7Sx7mDSR1vRJyIeB7mETzRpckz0cUiZU656AB1hRsMVzkm+no9urHcnEP6AcPukVlWGgsdcBloMoczwp8M/cnvrGg8SuroEnu82i3eY5TwmXBhtmFa06WUaiIafT8PcB+JVADwunS1nJ7tTGCjInVQY5qNogPJxdr97E9vuHJGMDpdCkDuvTFaF2FdnXuvli3nUr2w7mP3t991ocWQW9PMRUTJe+/pFJ935puy8zD797UKUR3d2GwZRHIpwbzmcP+QQ1wG3odoFk4i/tEUAHtKirh6VglQyp9BFIaIX7TuuqIyRqxcqHVsVfDVVouHBIYuy7uRDd7YjmoF3IqqIKsHEFBnMT9GSQeifjJAPYEOoPXfzoa1Ya8PbmSdYtVR9nyjIHHLv/xDYxG3ulBgmz1ieGe9pGNgqLmi6GSiyJ/Vj+5L+1bJGrVMDELHQR/bVdZMmoAp6y8f397hace2qHKDBVN4AVfDWeCiTs1NUtgrJVIpj3Xt788RrnIfvuhF4=" | ||
- secure: "CE2MWJZ+EtmaOheaGBd5XNgV7A/AGLpQ1Lct2R4v8BG3pXFFAM9uJEvpyTXBFx40gzD8HTBHbNRw1Ae+hP/Hz3M8o96jrdVsPlojKaShaOqoalYCghnfxDSd6WsstJdTYUk1iKhU3bSin/PHhDHe5i/dpwTay4DqSCX4MWaJPpItRIwiPpd8ekVGrHb/DkuTpEWY35Dg+9oao9KnB5c/D1oHLvInRMCivtpPpKRxNWkznOGprQALGIPmnHupBQ0zu6H7+K7TE/DT/HmocQd1h6HEba6DGkKqXU79NgS3uz2EFfgdhnIvTlxWTZFtkET9lym5mqjyuvwkIDsEDfGmk7dGjT0MFe2/9RRMxeNjINA1dlat4riUZ+a5dWqj/7uSvcOgTv0lqT5qitHbtqI0Id/TMaZlVE9r1x+vSTy/7ISzwhVPOwFa6SZJFwrHVBqnPZKP8gajpCcDJMKdFjfuLNZMF/NlDhj78S9Hyr0CUUoCKcPYiCxyCPfV7LzNMtlaynKJG2A+z0vLqZ8YSlTrqBfjuVzrq8EDJyJWMRuik3rkNe/GOFzUgQ+nBxgOzPT0Y5CPlEQNYW991pRz2r5gXhR+MSpjF3ytSrMCYYfIwymwqxb9oX4EvPCHCrWCqT4lebQyfPO8Pp8tDeV3XeRBM5a6KjOD0WfZ5pRlZ/REWrM=" | ||
|
||
cache: cargo | ||
|
||
addons: | ||
apt: | ||
packages: &linux_deps | ||
- libev-dev | ||
- uthash-dev | ||
- protobuf-compiler | ||
|
||
matrix: | ||
include: | ||
- name: "stable Linux x86_64/x86" | ||
language: rust | ||
rust: stable | ||
env: | ||
DEPLOY_BUILD=yes | ||
TARGET_32=i686-unknown-linux-gnu | ||
addons: | ||
apt: | ||
packages: | ||
- [*linux_deps, gcc-multilib, g++-multilib] | ||
before_install: | ||
# Install and use the current stable release of Go | ||
- gimme --list | ||
- eval "$(gimme stable)" | ||
- gimme --list | ||
install: | ||
- rustup component add clippy | ||
- rustup target add $TARGET_32 | ||
script: | ||
- RUSTFLAGS="-D warnings" cargo test --verbose | ||
- RUSTFLAGS="-D warnings" cargo package --verbose --allow-dirty | ||
- cargo clippy --examples -- -D warnings | ||
- cargo doc --no-deps | ||
- make -C examples | ||
# http3_test | ||
- RUSTFLAGS="-D warnings" cargo test --no-run --verbose --manifest-path tools/http3_test/Cargo.toml | ||
- cargo clippy --manifest-path tools/http3_test/Cargo.toml -- -D warnings | ||
# qlog | ||
- RUSTFLAGS="-D warnings" cargo test --verbose --manifest-path tools/qlog/Cargo.toml | ||
- cargo clippy --manifest-path tools/qlog/Cargo.toml -- -D warnings | ||
# quic-trace-log | ||
- RUSTFLAGS="-D warnings" cargo build --verbose --manifest-path tools/quic-trace-log/Cargo.toml | ||
- cargo clippy --manifest-path tools/quic-trace-log/Cargo.toml -- -D warnings | ||
# quiche-apps | ||
- RUSTFLAGS="-D warnings" cargo build --verbose --manifest-path tools/apps/Cargo.toml | ||
- cargo clippy --manifest-path tools/apps/Cargo.toml -- -D warnings | ||
# x86 cross build | ||
- RUSTFLAGS="-D warnings" cargo build --target=$TARGET_32 | ||
- name: "nightly Linux x86_64" | ||
language: rust | ||
rust: nightly | ||
addons: | ||
apt: | ||
packages: | ||
- [*linux_deps] | ||
before_install: | ||
# Install and use the current stable release of Go | ||
- gimme --list | ||
- eval "$(gimme stable)" | ||
- gimme --list | ||
install: | ||
- rustup component add rustfmt | ||
- cargo install cargo-fuzz | ||
script: | ||
- RUSTFLAGS="-D warnings" cargo test --verbose | ||
- RUSTFLAGS="-D warnings" cargo package --verbose --allow-dirty | ||
- cargo fmt -- --check | ||
- cargo doc --no-deps | ||
- make -C examples | ||
# fuzzers | ||
- RUSTFLAGS="-D warnings" cargo fuzz run packet_recv_client -- -runs=1 | ||
- RUSTFLAGS="-D warnings" cargo fuzz run packet_recv_server -- -runs=1 | ||
- RUSTFLAGS="-D warnings" cargo fuzz run qpack_decode -- -runs=1 | ||
- cargo fmt --manifest-path fuzz/Cargo.toml -- --check | ||
# http3_test | ||
- RUSTFLAGS="-D warnings" cargo test --no-run --verbose --manifest-path tools/http3_test/Cargo.toml | ||
- cargo fmt --manifest-path tools/http3_test/Cargo.toml -- --check | ||
# qlog | ||
- RUSTFLAGS="-D warnings" cargo test --verbose --manifest-path tools/qlog/Cargo.toml | ||
- cargo fmt --manifest-path tools/qlog/Cargo.toml -- --check | ||
# quic-trace-log | ||
- RUSTFLAGS="-D warnings" cargo build --verbose --manifest-path tools/quic-trace-log/Cargo.toml | ||
- cargo fmt --manifest-path tools/quic-trace-log/Cargo.toml -- --check | ||
# quiche-apps | ||
- RUSTFLAGS="-D warnings" cargo build --verbose --manifest-path tools/apps/Cargo.toml | ||
- cargo fmt --manifest-path tools/apps/Cargo.toml -- --check | ||
- name: "stable macOS + iOS" | ||
language: rust | ||
rust: stable | ||
os: osx | ||
osx_image: xcode11.2 | ||
install: | ||
- rustup target add aarch64-apple-ios x86_64-apple-ios | ||
script: | ||
# macOS | ||
- RUSTFLAGS="-D warnings" cargo build --verbose | ||
- RUSTFLAGS="-D warnings" cargo test --verbose | ||
# iOS | ||
- cargo install --force cargo-lipo | ||
- RUSTFLAGS="-D warnings" cargo lipo --verbose | ||
- name: "stable Windows x86_64/x86" | ||
language: rust | ||
rust: stable | ||
os: windows | ||
env: | ||
TARGET_64=x86_64-pc-windows-msvc | ||
TARGET_32=i686-pc-windows-msvc | ||
before_install: | ||
- choco install golang nasm | ||
# Update $PATH | ||
- export PATH="$(powershell -Command '("Process", "Machine" | % { [Environment]::GetEnvironmentVariable("PATH", $_) -Split ";" -Replace "\\$", "" } | Select -Unique | % { cygpath $_ }) -Join ":"')" | ||
install: | ||
- rustup target add $TARGET_32 $TARGET_64 | ||
script: | ||
- RUSTFLAGS="-D warnings" cargo build --verbose --target=$TARGET_64 | ||
- RUSTFLAGS="-D warnings" cargo test --verbose --target=$TARGET_64 | ||
- RUSTFLAGS="-D warnings" cargo build --verbose --target=$TARGET_32 | ||
- RUSTFLAGS="-D warnings" cargo test --verbose --target=$TARGET_32 | ||
- name: "stable Android" | ||
language: android | ||
dist: trusty | ||
env: | ||
NDK_VER_OLD=r13b | ||
NDK_VER=r21 | ||
CMAKE_VER=3.6.4111459 | ||
android: | ||
components: | ||
- build-tools-26.0.1 | ||
# Minimum API level supported | ||
- android-21 | ||
install: | ||
# Install rust manually | ||
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable | ||
- export PATH=$HOME/.cargo/bin:$PATH | ||
- rustup default stable | ||
- rustup target add aarch64-linux-android arm-linux-androideabi armv7-linux-androideabi i686-linux-android | ||
# Additional Android components | ||
- echo y | sdkmanager "cmake;$CMAKE_VER" | ||
- export PATH=$ANDROID_HOME/cmake/$CMAKE_VER/bin/:$PATH | ||
script: | ||
# | ||
# Old NDK. Here we use 13b | ||
# | ||
- NDK_URL=https://dl.google.com/android/repository/android-ndk-%s-linux-x86_64.zip | ||
- curl -ondk.zip -q $(printf $NDK_URL $NDK_VER_OLD) | ||
- unzip -q ndk.zip -d $HOME | ||
- export ANDROID_NDK_HOME=$HOME/android-ndk-$NDK_VER_OLD | ||
# Setup android toolchain | ||
- export TOOLCHAIN_DIR=$(pwd)/toolchain | ||
- mkdir -p $TOOLCHAIN_DIR | ||
- tools/setup_android.sh | ||
- tools/build_android.sh --verbose --features ndk-old-gcc | ||
- rm -fr $TOOLCHAIN_DIR && rm -f .cargo/config | ||
# | ||
# NDK 19 or higher. Here we use 21 (long term support) | ||
# | ||
- curl -ondk.zip -q $(printf $NDK_URL $NDK_VER) | ||
- unzip -q ndk.zip -d $HOME | ||
- export ANDROID_NDK_HOME=$HOME/android-ndk-$NDK_VER | ||
- cargo install cargo-ndk | ||
- cargo clean | ||
- tools/build_android_ndk19.sh --verbose | ||
- name: "NGINX" | ||
language: rust | ||
rust: stable | ||
env: | ||
NGINX_VER=1.16.1 | ||
addons: | ||
apt: | ||
packages: | ||
- [*linux_deps] | ||
before_install: | ||
# Install and use the current stable release of Go | ||
- gimme --list | ||
- eval "$(gimme stable)" | ||
- gimme --list | ||
script: | ||
- curl -O https://nginx.org/download/nginx-$NGINX_VER.tar.gz | ||
- tar xzf nginx-$NGINX_VER.tar.gz | ||
- | | ||
cd nginx-$NGINX_VER && | ||
patch -p01 < ../extras/nginx/nginx-1.16.patch && | ||
./configure --with-http_ssl_module --with-http_v2_module --with-http_v3_module --with-openssl="../deps/boringssl" --with-quiche=".." --with-debug && | ||
make -j`nproc` | ||
- objs/nginx -V | ||
|
||
deploy: | ||
# publish docs | ||
- provider: pages | ||
fqdn: docs.quic.tech | ||
local-dir: target/doc | ||
skip-cleanup: true | ||
github-token: $GITHUB_TOKEN | ||
on: | ||
branch: master | ||
condition: $DEPLOY_BUILD = yes | ||
# publish Docker images | ||
- provider: script | ||
skip-cleanup: true | ||
script: >- | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && | ||
make -C extras/docker all publish | ||
on: | ||
branch: master | ||
condition: $DEPLOY_BUILD = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @cloudflare/protocols |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Copyright (C) 2018-2019, Cloudflare, Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
[package] | ||
name = "quiche" | ||
version = "0.2.0" | ||
authors = ["Alessandro Ghedini <[email protected]>"] | ||
edition = "2018" | ||
build = "src/build.rs" | ||
description = "🥧 Savoury implementation of the QUIC transport protocol and HTTP/3" | ||
repository = "https://github.com/cloudflare/quiche" | ||
readme = "README.md" | ||
keywords = ["quic", "http3"] | ||
categories = ["network-programming"] | ||
license = "BSD-2-Clause" | ||
include = [ | ||
"/*.md", | ||
"/*.toml", | ||
"/CODEOWNERS", | ||
"/COPYING", | ||
"/benches", | ||
"/deps/boringssl/**/*.[chS]", | ||
"/deps/boringssl/**/*.cc", | ||
"/deps/boringssl/**/*.errordata", | ||
"/deps/boringssl/**/*.go", | ||
"/deps/boringssl/**/*.pl", | ||
"/deps/boringssl/**/CMakeLists.txt", | ||
"/deps/boringssl/*.md", | ||
"/deps/boringssl/LICENSE", | ||
"/deps/boringssl/sources.cmake", | ||
"/examples", | ||
"/include", | ||
"/quiche.svg", | ||
"/src", | ||
] | ||
|
||
[features] | ||
default = ["boringssl-vendored"] | ||
|
||
# Build vendored BoringSSL library. | ||
boringssl-vendored = [] | ||
|
||
# Generate pkg-config metadata file for libquiche. | ||
pkg-config-meta = [] | ||
|
||
# Equivalent to "--cfg fuzzing", but can also be checked in build.rs. | ||
fuzzing = [] | ||
|
||
# For building with Android NDK < 18 and GCC. | ||
ndk-old-gcc = [] | ||
|
||
# Build benchmarks. This is intended to make benchmark-specific dependencies | ||
# optional, so we don't have to build them for other targets. | ||
bench = ["criterion"] | ||
|
||
[package.metadata.docs.rs] | ||
default-features = false | ||
|
||
[build-dependencies] | ||
cmake = "0.1" | ||
|
||
[dependencies] | ||
log = { version = "0.4", features = ["std"] } | ||
libc = "0.2" | ||
ring = "0.16" | ||
criterion = { version = "0.3", optional = true } | ||
lazy_static = "1" | ||
rand = "0.7" | ||
bitflags = "1.2" | ||
|
||
[target."cfg(windows)".dependencies] | ||
winapi = { version = "0.3", features = ["wincrypt"] } | ||
|
||
[dev-dependencies] | ||
mio = "0.6" | ||
url = "1" | ||
docopt = "1" | ||
env_logger = "0.6" | ||
|
||
[profile.bench] | ||
debug = true | ||
|
||
[profile.release] | ||
debug = true | ||
|
||
[lib] | ||
crate-type = ["lib", "staticlib", "cdylib"] | ||
|
||
[[bench]] | ||
name = "benches" | ||
harness = false | ||
required-features = ["bench"] |
Oops, something went wrong.