diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..18fd326 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.aarch64-apple-darwin] +rustflags = ["-Clink-arg=-fuse-ld=lld"] + +[target.x86_64-apple-darwin] +rustflags = ["-Clink-arg=-fuse-ld=lld"] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d689235..91881d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,6 +62,9 @@ jobs: rustup toolchain install ${RUST_VERSION} rustup override set ${RUST_VERSION} rustup target add ${{ matrix.platform.target }} + - name: Install lld + run: | + brew install lld - name: Build run: | cargo build --release --locked --target ${{ matrix.platform.target }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1a5ddcf..36e6960 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -102,6 +102,10 @@ jobs: run: | rustup toolchain install nightly-${{ matrix.platform.target }} rustup override set nightly-${{ matrix.platform.target }} + - name: Install lld on macOS + if: matrix.platform.target == 'x86_64-apple-darwin' || matrix.platform.target == 'aarch64-apple-darwin' + run: | + brew install lld - name: Test env: RUSTFLAGS: -A dead_code -A unused_variables diff --git a/book/src/benchmarks.md b/book/src/benchmarks.md index 53e637b..3efa65e 100644 --- a/book/src/benchmarks.md +++ b/book/src/benchmarks.md @@ -10,16 +10,16 @@ This page includes some benchmarks comparing Sandhole and competing solutions. ## Results -| aes256-gcm | sandhole v0.9.2-preview | sish v2.22.1 | Speedup | -| ---------------- | ----------------------- | ------------ | ------- | -| HTTPS GET 50MB | 111.8ms | 109.2ms | 0.977x | -| HTTPS GET 100MB | 195.8ms | 178.8ms | 0.913x | -| HTTPS POST 50MB | 125.8ms | 137.0ms | 1.089x | -| HTTPS POST 100MB | 224.8ms | 236.4ms | 1.052x | +| aes256-gcm | sandhole v0.9.2 | sish v2.22.1 | Speedup | +| ---------------- | --------------- | ------------ | ------- | +| HTTPS GET 50MB | 111.8ms | 109.2ms | 0.977x | +| HTTPS GET 100MB | 195.8ms | 178.8ms | 0.913x | +| HTTPS POST 50MB | 125.8ms | 137.0ms | 1.089x | +| HTTPS POST 100MB | 224.8ms | 236.4ms | 1.052x | -| chacha20-poly1305 | sandhole v0.9.2-preview | sish v2.22.1 | Speedup | -| ----------------- | ----------------------- | ------------ | ------- | -| HTTPS GET 50MB | 112.2ms | 139.0ms | 1.239x | -| HTTPS GET 100MB | 183.8ms | 248.2ms | 1.350x | -| HTTPS POST 50MB | 141.4ms | 153.6ms | 1.086x | -| HTTPS POST 100MB | 254.4ms | 271.8ms | 1.068x | +| chacha20-poly1305 | sandhole v0.9.2 | sish v2.22.1 | Speedup | +| ----------------- | --------------- | ------------ | ------- | +| HTTPS GET 50MB | 112.2ms | 139.0ms | 1.239x | +| HTTPS GET 100MB | 183.8ms | 248.2ms | 1.350x | +| HTTPS POST 50MB | 141.4ms | 153.6ms | 1.086x | +| HTTPS POST 100MB | 254.4ms | 271.8ms | 1.068x |