Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rustls-ring feature to make ring optional #363

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
CARGO_TERM_COLOR: always
CROSS_FEATURES: --no-default-features --features vendored-openssl,quic,vendored-c-ares,hickory
CROSS_FEATURES: --no-default-features --features vendored-openssl,rustls-ring,quic,vendored-c-ares,hickory
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER: riscv64-linux-gnu-gcc
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER: powerpc64le-linux-gnu-gcc
Expand Down
45 changes: 37 additions & 8 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,42 @@ jobs:
- name: Cargo clippy
run: cargo clippy --tests -- --deny warnings

build-vendored:
build-vendored-g1:
name: Build vendored
runs-on: ubuntu-latest
strategy:
matrix:
feature:
- vendored-openssl,rustls-ring
- vendored-tongsuo,rustls-ring
- vendored-aws-lc,rustls-aws-lc
- vendored-boringssl,rustls-ring
component:
- g3proxy
- g3bench
- g3tiles
include:
- feature: vendored-c-ares,rustls-ring
component: g3proxy
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install capnproto libc-ares-dev libssl-dev liblua5.4-dev
- name: Cargo build
run: cargo build --no-default-features --features ${{ matrix.feature }} -p ${{ matrix.component }}
- name: Cargo clippy
run: cargo clippy --no-default-features --features ${{ matrix.feature }} -p ${{ matrix.component }} -- --deny warnings

build-vendored-g2:
name: Build vendored
runs-on: ubuntu-latest
strategy:
Expand All @@ -80,15 +115,9 @@ jobs:
- vendored-aws-lc
- vendored-boringssl
component:
- g3proxy
- g3bench
- g3tiles
- g3fcgen
- g3mkcert
- g3keymess
include:
- feature: vendored-c-ares
component: g3proxy
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -101,7 +130,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install capnproto libc-ares-dev libssl-dev liblua5.4-dev
sudo apt-get install capnproto libssl-dev
- name: Cargo build
run: cargo build --no-default-features --features ${{ matrix.feature }} -p ${{ matrix.component }}
- name: Cargo clippy
Expand Down
43 changes: 35 additions & 8 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,40 @@ jobs:
run: cargo clippy --tests -- --deny warnings
- name: Cargo test
run: cargo test --workspace --exclude g3-journal
build-vendored:
build-vendored-g1:
name: Build vendored
runs-on: macos-latest
strategy:
matrix:
feature:
- vendored-openssl,rustls-ring
- vendored-tongsuo,rustls-ring
- vendored-aws-lc,rustls-aws-lc
- vendored-boringssl,rustls-ring
component:
- g3proxy
- g3bench
- g3tiles
include:
- feature: vendored-c-ares,rustls-ring
component: g3proxy
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install dependencies
run: |
brew install capnp openssl c-ares lua
- name: Cargo build
run: cargo build --no-default-features --features ${{ matrix.feature }} -p ${{ matrix.component }}
- name: Cargo clippy
run: cargo clippy --no-default-features --features ${{ matrix.feature }} -p ${{ matrix.component }} -- --deny warnings
build-vendored-g2:
name: Build vendored
runs-on: macos-latest
strategy:
Expand All @@ -55,15 +88,9 @@ jobs:
- vendored-aws-lc
- vendored-boringssl
component:
- g3proxy
- g3bench
- g3tiles
- g3fcgen
- g3mkcert
- g3keymess
include:
- feature: vendored-c-ares
component: g3proxy
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -75,7 +102,7 @@ jobs:
components: clippy
- name: Install dependencies
run: |
brew install capnp openssl c-ares lua
brew install capnp openssl
- name: Cargo build
run: cargo build --no-default-features --features ${{ matrix.feature }} -p ${{ matrix.component }}
- name: Cargo clippy
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
strategy:
matrix:
feature:
- vendored-openssl
- vendored-tongsuo
- vendored-openssl,rustls-ring
- vendored-tongsuo,rustls-ring
# - vendored-aws-lc
# - vendored-boringssl
steps:
Expand All @@ -55,18 +55,18 @@ jobs:
strategy:
matrix:
feature:
- vendored-openssl
- vendored-tongsuo
- vendored-aws-lc
- vendored-boringssl
- vendored-openssl,rustls-ring
- vendored-tongsuo,rustls-ring
- vendored-aws-lc,rustls-aws-lc
- vendored-boringssl,rustls-ring
steps:
- name: Install common tools
run: choco install capnproto
- name: Install nasm and ninja for BoringSSL
if: matrix.feature == 'vendored-boringssl'
if: contains(matrix.feature, 'vendored-boringssl')
run: choco install nasm ninja
- name: Install nasm for AWS-LC
if: matrix.feature == 'vendored-aws-lc'
if: contains(matrix.feature, 'vendored-aws-lc')
uses: ilammy/setup-nasm@v1
- name: Checkout sources
uses: actions/checkout@v4
Expand Down
47 changes: 40 additions & 7 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
env:
CARGO_TERM_COLOR: always
VCPKG_ROOT: C:\vcpkg
WIN_FEATURES: quic,vendored-c-ares,hickory
WIN_FEATURES: rustls-ring,quic,vendored-c-ares,hickory

jobs:
build:
Expand All @@ -48,7 +48,43 @@ jobs:
- name: Cargo test
run: cargo test --no-default-features --features $env:WIN_FEATURES --workspace --exclude g3-journal

build-vendored:
build-vendored-g1:
name: Build vendored
runs-on: windows-latest
strategy:
matrix:
feature:
- vendored-openssl,rustls-ring
- vendored-tongsuo,rustls-ring
- vendored-aws-lc,rustls-aws-lc
- vendored-boringssl,rustls-ring
component:
- g3proxy
- g3bench
- g3tiles
steps:
- name: Install common tools
run: choco install capnproto
- name: Install nasm and ninja for BoringSSL
if: contains(matrix.feature, 'vendored-boringssl')
run: choco install nasm ninja
- name: Install nasm for AWS-LC
if: contains(matrix.feature, 'vendored-aws-lc')
uses: ilammy/setup-nasm@v1
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cargo build
run: cargo build --no-default-features --features ${{ matrix.feature }} -p ${{ matrix.component }}
- name: Cargo clippy
run: cargo clippy --no-default-features --features ${{ matrix.feature }} -p ${{ matrix.component }} -- --deny warnings

build-vendored-g2:
name: Build vendored
runs-on: windows-latest
strategy:
Expand All @@ -59,20 +95,17 @@ jobs:
- vendored-aws-lc
- vendored-boringssl
component:
- g3proxy
- g3bench
- g3tiles
- g3fcgen
- g3mkcert
- g3keymess
steps:
- name: Install common tools
run: choco install capnproto
- name: Install nasm and ninja for BoringSSL
if: matrix.feature == 'vendored-boringssl'
if: contains(matrix.feature, 'vendored-boringssl')
run: choco install nasm ninja
- name: Install nasm for AWS-LC
if: matrix.feature == 'vendored-aws-lc'
if: contains(matrix.feature, 'vendored-aws-lc')
uses: ilammy/setup-nasm@v1
- name: Checkout sources
uses: actions/checkout@v4
Expand Down
20 changes: 13 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ async-recursion = "1.1"
pin-project-lite = "0.2"
#
rustls-pki-types = { version = "1", default-features = false }
rustls = { version = "0.23.15", default-features = false, features = ["std", "tls12", "ring", "brotli"] }
tokio-rustls = { version = "0.26", default-features = false, features = ["tls12", "ring"] }
rustls = { version = "0.23.15", default-features = false, features = ["std", "tls12", "brotli"] }
tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] }
quinn = { version = "0.11", default-features = false, features = ["runtime-tokio"] }
quinn-udp = { version = "0.5.6", default-features = false, features = ["fast-apple-datapath"] }
#
Expand Down
18 changes: 1 addition & 17 deletions doc/openssl-variants.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ then you need to use Tongsuo.

Use `--features vendored-tongsuo` cargo build option.

### Package

Switch to branch `rel/tlcp-tongsuo`, then run the build script or create the release tarball as usual.

# BoringSSL

See [BoringSSL](https://boringssl.googlesource.com/boringssl/) for more introduction.
Expand All @@ -37,18 +33,12 @@ As an alternative, you can switch to use BoringSSl as a solution.

## How

BoringSSL is supported in branch `rel/boringssl`.

### Build

- Make sure you have `cmake`, `pkg-config`installed

- Build with `--features vendored-boringssl` cargo option

### Package

Switch to branch `rel/boringssl`, then run the build script or create the release tarball as usual.

# AWS-LC

See [AWS-LC](https://github.com/aws/aws-lc) for more introduction.
Expand All @@ -60,16 +50,10 @@ As an alternative, you can switch to use AWS-LC as a solution on AWS EC2 hosts.

## How

AWS-LC is supported in branch `rel/aws-lc`.

### Build

- Make sure you have `cmake`, `pkg-config` installed

- Install a recent version of [go](https://go.dev/dl/) if you want to do AWS-LC code generation.

- Build with `--features vendored-aws-lc` cargo build option.

### Package

Switch to branch `rel/aws-lc`, then run the build script or create the release tarball as usual.
- Build with `--no-default-features --features vendored-aws-lc,rustls-aws-lc,<other features>` cargo build option.
5 changes: 3 additions & 2 deletions g3bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ g3-hickory-client.workspace = true
g3-build-env.workspace = true

[features]
default = ["quic"]
default = ["quic", "rustls-ring"]
quic = ["g3-types/quic", "g3-socks/quic", "g3-io-ext/quic", "g3-hickory-client/quic", "dep:quinn", "dep:h3", "dep:h3-quinn"]
rustls-aws-lc = ["rustls/aws-lc-rs"]
rustls-ring = ["g3-types/rustls-ring", "rustls/ring", "quinn?/rustls-ring"]
rustls-aws-lc = ["g3-types/rustls-aws-lc", "rustls/aws-lc-rs", "quinn?/rustls-aws-lc-rs"]
vendored-openssl = ["openssl/vendored", "openssl-probe"]
vendored-tongsuo = ["openssl/tongsuo", "openssl-probe", "g3-types/tongsuo"]
vendored-aws-lc = ["rustls-aws-lc", "openssl/aws-lc", "openssl-probe", "g3-types/aws-lc", "g3-tls-cert/aws-lc", "g3-openssl/aws-lc"]
Expand Down
Loading
Loading